/* ── Settipally Report – Front CSS ── */
@import url('https://fonts.googleapis.com/css2?family=Tiro+Telugu&family=Noto+Serif:ital,wght@0,700;1,700&display=swap');

:root {
  --sr-yellow: #FFFDE0;
  --sr-yellow-border: #e6d800;
  --sr-blue: #0a2f6e;
  --sr-blue-light: #1a4fa8;
  --sr-accent: #c8a000;
  --sr-radius: 10px;
  --sr-shadow: 0 4px 24px rgba(10,47,110,.13);
}

.sr-wrap { max-width: 780px; margin: 30px auto; font-family: 'Tiro Telugu', Georgia, serif; }

/* Card */
.sr-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--sr-shadow);
  border: 2px solid var(--sr-yellow-border);
  overflow: hidden;
  margin-bottom: 32px;
}

.sr-header {
  background: linear-gradient(135deg, var(--sr-blue) 0%, var(--sr-blue-light) 100%);
  padding: 28px 32px 22px;
  text-align: center;
}
.sr-title-block { display:flex; flex-direction:column; align-items:center; gap:4px; }
.sr-icon { font-size: 2.4rem; }
.sr-title {
  font-family: 'Noto Serif', serif;
  font-style: italic;
  font-weight: 700;
  color: #fff;
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.sr-sub { color: rgba(255,255,255,.75); margin:0; font-size:.9rem; letter-spacing:1px; }

/* Form */
form#sr-form { padding: 28px 32px 24px; }

.sr-field-group { margin-bottom: 18px; }
.sr-label {
  display: block;
  font-weight: 700;
  font-style: italic;
  color: var(--sr-blue);
  margin-bottom: 6px;
  font-size: .96rem;
}
.req { color: #c0392b; }

.sr-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  background: var(--sr-yellow) !important;
  border: 1.5px solid var(--sr-yellow-border);
  border-radius: var(--sr-radius);
  font-family: 'Noto Serif', serif;
  font-weight: 700;
  font-style: italic;
  color: var(--sr-blue);
  font-size: 1rem;
  transition: border .2s, box-shadow .2s;
  outline: none;
}
.sr-input:focus {
  border-color: var(--sr-blue);
  box-shadow: 0 0 0 3px rgba(10,47,110,.12);
}
.sr-input::placeholder { font-weight: 400; font-style: italic; color: #a89f60; }

.sr-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }

/* Upload */
.sr-upload-area {
  position: relative;
  border: 2px dashed var(--sr-yellow-border);
  border-radius: var(--sr-radius);
  background: var(--sr-yellow);
  cursor: pointer;
  overflow: hidden;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sr-upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2;
}
.sr-upload-ui { text-align: center; padding: 16px; pointer-events: none; }
.sr-upload-icon { font-size: 2rem; display: block; }
.sr-upload-text {
  font-weight: 700; font-style: italic; color: var(--sr-blue); font-size: .9rem;
}
.sr-preview { position: relative; width: 100%; text-align: center; padding: 8px; }
.sr-preview img { max-height: 140px; border-radius: 8px; border: 2px solid var(--sr-blue); }
.sr-remove-img {
  position: absolute; top: 2px; right: 8px;
  background: #c0392b; color: #fff; border: none;
  border-radius: 50%; width: 24px; height: 24px;
  cursor: pointer; font-size: .8rem; line-height: 24px; text-align: center;
}

/* Button */
.sr-btn {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--sr-blue) 0%, var(--sr-blue-light) 100%);
  color: #fff;
  border: none; border-radius: var(--sr-radius);
  font-family: 'Noto Serif', serif; font-weight: 700; font-style: italic;
  font-size: 1.08rem; letter-spacing: .5px;
  cursor: pointer; margin-top: 10px;
  transition: opacity .2s, transform .1s;
  box-shadow: 0 3px 12px rgba(10,47,110,.3);
}
.sr-btn:hover { opacity: .92; transform: translateY(-1px); }
.sr-btn:active { transform: translateY(0); }

/* Message */
.sr-msg {
  margin: 0 32px 0;
  padding: 12px 16px;
  border-radius: var(--sr-radius);
  font-weight: 700; font-style: italic;
  font-family: 'Noto Serif', serif;
}
.sr-msg.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.sr-msg.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Records */
.sr-records-wrap {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--sr-shadow);
  border: 2px solid var(--sr-yellow-border);
  padding: 22px 28px;
}
.sr-records-title {
  font-family: 'Noto Serif', serif; font-weight: 700; font-style: italic;
  color: var(--sr-blue); margin: 0 0 16px; font-size: 1.1rem;
}
.sr-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.sr-badge {
  display: inline-block;
  background: var(--sr-yellow);
  border: 1.5px solid var(--sr-yellow-border);
  color: var(--sr-blue);
  font-family: 'Noto Serif', serif; font-weight: 700; font-style: italic;
  padding: 6px 14px; border-radius: 20px;
  text-decoration: none; font-size: .9rem;
  transition: background .2s, border-color .2s;
}
.sr-badge:hover { background: var(--sr-blue); color: #fff; border-color: var(--sr-blue); }
.sr-no-records { color: #888; font-style: italic; }

/* Popup */
.sr-popup-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 99999;
  display: flex; align-items: center; justify-content: center;
}
.sr-popup {
  background: #fff; border-radius: 14px; width: 420px; max-width: 95vw;
  box-shadow: 0 12px 48px rgba(0,0,0,.35);
  border: 2px solid var(--sr-yellow-border);
  overflow: hidden;
  position: relative;
  cursor: move;
  user-select: none;
}
.sr-popup-header {
  background: linear-gradient(135deg, var(--sr-blue), var(--sr-blue-light));
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.sr-popup-header h4 {
  color: #fff; margin: 0;
  font-family: 'Noto Serif', serif; font-style: italic; font-size: 1rem;
}
.sr-popup-close {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  color: #fff; border-radius: 6px; padding: 4px 10px; cursor: pointer;
  font-family: 'Noto Serif', serif; font-style: italic; font-size: .85rem;
}
.sr-popup-body { padding: 20px; }
.sr-popup-photo {
  width: 100%; max-height: 180px; object-fit: cover;
  border-radius: 8px; margin-bottom: 14px; border: 2px solid var(--sr-yellow-border);
}
.sr-popup-table { width: 100%; border-collapse: collapse; }
.sr-popup-table th, .sr-popup-table td {
  padding: 8px 10px; border-bottom: 1px solid #f0e88a;
  font-family: 'Noto Serif', serif; text-align: left;
}
.sr-popup-table th {
  font-weight: 700; font-style: italic; color: var(--sr-blue);
  width: 42%; font-size: .9rem;
}
.sr-popup-table td { color: #333; font-size: .9rem; }

/* Responsive */
@media (max-width: 600px) {
  .sr-row { grid-template-columns: 1fr; }
  form#sr-form { padding: 20px 16px; }
  .sr-card { border-radius: 10px; }
}
