/* =====================================================
   CTV SIMULATOR – INDIA
   Unified style.css – MEDIUM SHADE THEME
   ===================================================== */

/* ---------- BASE & RESET ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: #eef2f5;  /* light-medium background for outer page */
    color: #2c3e44;       /* dark slate for text */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    padding:0px;
}

.page-content {
  padding: 30px;
}
/* ---------- TYPOGRAPHY & TITLES ---------- */
h1, h2, h3 {
    color: #1f2d35;
}
h2 {
    font-size: 28px;
    margin-top: 20px;
}
.section-title {
    font-size: 14px;
    color: #5a6e7a;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* ---------- LAYOUT ---------- */
.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.container-login {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}
.full-width {
    grid-column: span 2;
}
@media (max-width: 1024px) {
    .container-login {
        grid-template-columns: repeat(2, 1fr);
    }
    .full-width {
        grid-column: span 2;
    }
}
@media (max-width: 600px) {
    .container-login {
        grid-template-columns: 1fr;
    }
    .full-width {
        grid-column: span 1;
    }
}

/* ---------- SECTIONS (cards) ---------- */
.section {
    background: #ffffff;  /* white cards on medium background */
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #d8e2e8;
}

/* ---------- NAVBAR (all pages) – medium shade ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #cfdfe8;  /* medium blue-gray */
    border-bottom: 1px solid #b8c9d4;
    width: 100%;
}
.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}
.logo {
    width: 150px;
    max-width: 175px;
    object-fit: contain;
}
.product-name {
    font-size: 16px;
    font-weight: bold;
    color: #1f4d6e;
}
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    margin-left: auto;
}
.hamburger span {
    width: 100%;
    height: 3px;
    background: #2c3e44;
    border-radius: 3px;
    transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}
.nav-right {
    position: fixed;
    top: 60px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 60px);
    background: #cfdfe8;
    border-left: 1px solid #b8c9d4;
    flex-direction: column;
    padding: 20px;
    gap: 10px;
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
}
.nav-right.show {
    right: 0;
}
.nav-right a {
    color: #2c3e44;
    text-decoration: none;
    font-size: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    display: block;
    text-align: left;
    width: 100%;
}
.nav-right a:hover {
    color: white;
    background: #1f4d6e;
    font-weight: 700;
    transform: translateX(5px);
}
.nav-right a.active {
    color: #1f4d6e;
    background: rgba(31,77,110,0.1);
    font-weight: 700;
    border-left: 3px solid #1f4d6e;
}
@media (min-width: 769px) {
    .hamburger { display: flex; margin-left: auto; }
    .nav-right { position: fixed; top: 60px; right: -100%; width: 300px; }
    .nav-right.show { right: 0; }
}
@media (max-width: 768px) {
    .navbar { flex-direction: row; justify-content: space-between; flex-wrap: nowrap; }
    .hamburger { display: flex; margin-left: auto; margin-right: 0; }
    .nav-left { flex-shrink: 0; }
    .product-name { font-size: 14px; }
    .nav-right { width: 280px; top: 56px; height: calc(100vh - 56px); }
}
@media (max-width: 480px) {
    .product-name { font-size: 12px; }
    .nav-right { width: 100%; top: 52px; }
}

/* ---------- FORMS & INPUTS ---------- */
.field {
    margin-bottom: 20px;
}
label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e44;
}
.hint {
    font-size: 0.75rem;
    color: #5a6e7a;
    margin-top: 5px;
}
input, select, textarea {
    display: block;
    margin: 10px 0;
    padding: 10px;
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #f9fcff;
    color: #1f2d35;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #1f4d6e;
    box-shadow: 0 0 0 2px rgba(31,77,110,0.2);
}
button, .button {
    background: #1f4d6e;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}
button:hover, .button:hover {
    background: #123a54;
    transform: translateY(-1px);
}
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-primary {
    background: #1f4d6e;
    color: white;
}
.btn-primary:hover {
    background: #123a54;
    transform: translateY(-2px);
}
.btn-secondary {
    background: transparent;
    color: #1f4d6e;
    border: 1px solid #1f4d6e;
}
.btn-secondary:hover {
    background: rgba(31,77,110,0.1);
    transform: translateY(-2px);
}

/* ---------- KPI GRID (dashboard) ---------- */
.kpi-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}
.kpi {
    background: #f0f4f8;
    border-radius: 12px;
    padding: 15px;
    flex: 1 1 150px;
    text-align: center;
    border: 1px solid #d8e2e8;
}
.kpi-title {
    font-size: 0.8rem;
    color: #5a6e7a;
    text-transform: uppercase;
}
.kpi-value {
    font-size: 1.8rem;
    font-weight: bold;
}
.green { color: #2b6e3c; }
.yellow { color: #b45f06; }
.red { color: #b91c1c; }

/* ---------- TABLES ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #d8e2e8;
}
th {
    color: #5a6e7a;
    font-weight: 600;
}

/* ---------- CARDS (history, report) ---------- */
.card {
    background: #f9fcff;
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border: 1px solid #d8e2e8;
}
.row {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}
.result {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #d8e2e8;
}
.value {
    font-weight: bold;
}
.green-bg {
    background: #e6f4ea;
    border-left: 4px solid #2b6e3c;
}
.yellow-bg {
    background: #fff4e5;
    border-left: 4px solid #b45f06;
}
.red-bg {
    background: #fee7e7;
    border-left: 4px solid #b91c1c;
}

/* ---------- HISTORY SPECIFIC ---------- */
.history-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}
@media (max-width: 1024px) { .history-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 600px) { .history-grid { grid-template-columns: 1fr; } }
.select-all {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    background: #eef2f5;
    padding: 10px 15px;
    border-radius: 8px;
}
.select-all input { width: 18px; height: 18px; cursor: pointer; }
.load-btn, .delete-btn {
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: none;
    display: inline-block;
}
.load-btn { background: #1f4d6e; color: white; }
.load-btn:hover { background: #123a54; }
.delete-btn { background: #b91c1c; color: white; }
.delete-btn:hover { background: #991b1b; }
.bulk-delete-btn {
    background: #b91c1c;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    margin-left: 10px;
}
.bulk-delete-btn:hover { background: #991b1b; }

/* ---------- DASHBOARD: inline form, collapsible ---------- */
.inline-form {
    background: #f0f4f8 !important;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.form-field {
    display: flex;
    flex-direction: column;
}
.form-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2c3e44;
    margin-bottom: 4px;
}
.form-field input, .form-field select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
}
.update-btn {
    margin-top: 15px;
    background: #1f4d6e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}
.update-btn:hover { background: #123a54; }

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.collapsible-header h3 { margin: 0; color: #1f2d35; }
.toggle-icon { font-size: 1.5rem; transition: transform 0.2s; }

/* Disclaimer modal */
.disclaimer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}
.disclaimer-content {
    background: #ffffff;
    max-width: 600px;
    margin: 20px;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    color: #2c3e44;
}
.disclaimer-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}
.btn-agree { background: #1f4d6e; color: white; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: bold; }
.btn-disagree { background: #b91c1c; color: white; padding: 10px 20px; border-radius: 8px; cursor: pointer; }

/* Recommendations grid (dashboard) */
.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    margin-top: 10px;
}
@media (max-width: 800px) {
    .recommendation-grid { grid-template-columns: 1fr; }
}
.rec-card {
    background: #f9fcff;
    border-radius: 12px;
    padding: 18px;
    border-left: 4px solid;
    transition: transform 0.1s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.rec-card:hover { transform: translateY(-2px); }
.priority-high { border-left-color: #b91c1c; }
.priority-medium { border-left-color: #b45f06; }
.priority-low { border-left-color: #1f4d6e; }
.rec-title { font-weight: bold; font-size: 1rem; margin-bottom: 8px; color: #1f2d35; }
.rec-description { font-size: 0.85rem; color: #2c3e44; margin-bottom: 8px; }
.rec-impact { font-size: 0.75rem; color: #1f4d6e; }

/* Scenario Simulator (dashboard) */
.simulator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 20px;
}
.sim-card {
    background: #f9fcff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #d8e2e8;
}
.sim-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 600;
    color: #2c3e44;
}
.sim-value {
    font-size: 1.1rem;
    color: #1f4d6e;
    font-weight: bold;
}
.sim-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: #cbd5e1;
    border-radius: 3px;
    outline: none;
}
.sim-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1f4d6e;
    cursor: pointer;
    border: none;
}
.sim-hint {
    font-size: 0.7rem;
    color: #5a6e7a;
    margin-top: 8px;
}
.reset-btn {
    background: #cbd5e1;
    color: #1f2d35;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
}
.reset-btn:hover { background: #b8c9d4; }
.sim-result-panel {
    margin-top: 20px;
    padding: 20px;
    background: #f9fcff;
    border-radius: 12px;
    border: 1px solid #d8e2e8;
}
.sim-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}
.sim-metric {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: #f0f4f8;
    border-radius: 10px;
}
.sim-metric-label {
    font-size: 0.75rem;
    color: #5a6e7a;
    text-transform: uppercase;
}
.sim-metric-value {
    font-size: 1.6rem;
    font-weight: bold;
    margin-top: 4px;
}
.sim-footnote {
    margin-top: 16px;
    font-size: 0.7rem;
    color: #5a6e7a;
    text-align: center;
}

/* CMO Section */
.cmo-section {
    border-left: 4px solid #1f4d6e;
}
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 10px;
}
.strategy-card {
    background: #f0f4f8;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #d8e2e8;
}
.strategy-card h4 { color: #1f4d6e; margin-bottom: 12px; }
.strategy-card .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.strategy-card .label { color: #5a6e7a; }

/* Glossary */
.glossary {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    padding: 20px;
}
.left {
    background: #eef2f5;
    padding: 15px;
    border-radius: 10px;
    height: 85vh;
    overflow-y: auto;
    position: sticky;
    top: 20px;
}
.item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #d8e2e8;
    color: #2c3e44;
}
.item:hover { background: #e2e8f0; }
.item.active { background: #1f4d6e; color: white; font-weight: bold; }
.right {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    overflow-y: auto;
    height: 85vh;
}
.def-block {
    margin-bottom: 16px;
    border-left: 3px solid #1f4d6e;
    padding-left: 12px;
}
.def-label {
    font-weight: bold;
    color: #1f4d6e;
    text-transform: uppercase;
    font-size: 0.75rem;
}
.def-text { color: #2c3e44; line-height: 1.5; }

/* Feedback page */
.feedback-container {
    max-width: 800px;
    margin: 40px auto;
}
.feedback-form .field {
    margin-bottom: 24px;
}
.feedback-form label {
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
}
.feedback-form select,
.feedback-form textarea,
.feedback-form input[type="text"] {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    font-size: 1rem;
    transition: border 0.2s;
}
.feedback-form select:focus,
.feedback-form textarea:focus,
.feedback-form input[type="text"]:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.2);
}
.feedback-form textarea {
    min-height: 150px;
    resize: vertical;
}
.success-msg, .error-msg {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
}
.success-msg {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.error-msg {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.note {
    font-size: 0.85rem;
    color: #475569;
    text-align: center;
    margin-top: 24px;
}
button[type="submit"] {
    background: #16a34a;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}
button[type="submit"]:hover {
    background: #15803d;
    transform: translateY(-2px);
}
.hint {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 6px;
}
/* Settings specific */
.badge-session { background: #1f4d6e; color: white; }
.badge-standalone { background: #b45f06; color: white; }

/* Misc utility */
.warning-msg {
    background: #fff4e5;
    border: 1px solid #b45f06;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #b45f06;
}
.hint { font-size: 0.7rem; color: #5a6e7a; margin-top: 4px; }
@media print {
    .navbar, .button, .subtitle, .select-all, .bulk-delete-btn, .load-btn, .delete-btn { display: none !important; }
    body { background: white; color: black; padding: 0; }
    .card { break-inside: avoid; background: #f8fafc !important; color: black !important; border: 1px solid #ccc; }
    .result { border-top-color: #ddd; }
    .green, .yellow, .red { color: black !important; }
    .section, .summary { background: #f1f5f9 !important; color: black !important; }
    table { border-color: #ccc; }
}
