/* ==========================================================================
   Niagara County Sheriff - Press Reporting System
   Complete Visual Redesign — Modern Law Enforcement Portal
   Built on Bootstrap 5.3.3
   ========================================================================== */

/* ==========================================================================
   Design Tokens
   ========================================================================== */

:root {
    /* Core palette */
    --navy-900: #0a1128;
    --navy-800: #0f1a33;
    --navy-700: #162240;
    --navy-600: #1e3055;
    --navy-500: #2a4070;
    --navy-400: #3d5a8a;
    --gold-500: #c9a227;
    --gold-400: #d4b44a;
    --gold-300: #e2c96e;
    --gold-600: #a8871e;
    --gold-100: #fdf6e3;

    /* Semantic colors */
    --surface: #f7f8fb;
    --surface-raised: #ffffff;
    --surface-sunken: #eef1f6;
    --border: #d6dce8;
    --border-light: #e8ecf2;
    --text-primary: #1a2332;
    --text-secondary: #5a6b82;
    --text-muted: #8895a7;
    --accent-blue: #4a7fd4;
    --success: #2d9d6f;
    --danger: #d94452;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(10, 17, 40, 0.04);
    --shadow-sm: 0 1px 3px rgba(10, 17, 40, 0.06), 0 1px 2px rgba(10, 17, 40, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(10, 17, 40, 0.06), 0 2px 4px -1px rgba(10, 17, 40, 0.04);
    --shadow-lg: 0 10px 25px -3px rgba(10, 17, 40, 0.08), 0 4px 10px -2px rgba(10, 17, 40, 0.04);
    --shadow-xl: 0 20px 40px -5px rgba(10, 17, 40, 0.1), 0 8px 16px -4px rgba(10, 17, 40, 0.05);
    --shadow-gold: 0 4px 14px rgba(201, 162, 39, 0.15);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
}

/* ==========================================================================
   Base & Typography
   ========================================================================== */

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a2332;
    color: var(--text-primary);
    background-color: #f7f8fb;
    background-color: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: #1a2332;
    color: var(--text-primary);
}

a {
    color: #4a7fd4;
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--duration-fast) ease;
}

a:hover {
    color: #162240;
    color: var(--navy-700);
    text-decoration: none;
}

::selection {
    background-color: rgba(201, 162, 39, 0.2);
    color: #0a1128;
}

/* ==========================================================================
   Top Bar (utility strip above navbar)
   ========================================================================== */

.top-bar {
    background-color: #0a1128;
    background-color: var(--navy-900);
    padding: 6px 0;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
}

.top-bar a {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    transition: color var(--duration-fast) ease;
}

.top-bar a:hover {
    color: #d4b44a;
    color: var(--gold-400);
}

.top-bar .gold-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #c9a227;
    background: var(--gold-500);
    border-radius: 50%;
    margin: 0 8px;
    vertical-align: middle;
}

/* ==========================================================================
   Main Navbar
   ========================================================================== */

.navbar-main {
    background: linear-gradient(180deg, #162240 0%, #0f1a33 100%);
    background: linear-gradient(180deg, var(--navy-700) 0%, var(--navy-800) 100%);
    padding: 0;
    box-shadow: 0 4px 20px rgba(10, 17, 40, 0.3);
    position: relative;
    z-index: 1000;
}

.navbar-main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #c9a227 50%, transparent 100%);
    opacity: 0.6;
}

.navbar-main .navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff !important;
    text-decoration: none;
}

.brand-badge {
    height: 44px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: transform var(--duration-normal) var(--ease-out);
}

.navbar-brand:hover .brand-badge {
    transform: scale(1.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text .brand-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.brand-text .brand-subtitle {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.navbar-main .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 1rem 1.1rem;
    position: relative;
    transition: color var(--duration-fast) ease;
}

.navbar-main .navbar-nav .nav-link:hover,
.navbar-main .navbar-nav .nav-link:focus {
    color: #fff;
}

.navbar-main .navbar-nav .nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.1rem;
    right: 1.1rem;
    height: 2px;
    background: #c9a227;
    background: var(--gold-500);
    border-radius: 2px 2px 0 0;
}

.navbar-main .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.15);
    padding: 6px 10px;
}

.navbar-main .navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.3);
}

/* Navbar auth section */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-auth .nav-link {
    font-size: 0.85rem !important;
    padding: 0.5rem 0.85rem !important;
    border-radius: var(--radius-sm);
}

.nav-auth .nav-link-login {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.nav-auth .nav-link-login:hover {
    background: rgba(255, 255, 255, 0.14);
}

.nav-user-greeting {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.85rem !important;
    padding: 0.5rem 0.5rem !important;
}

.nav-user-greeting a,
.text-accent {
    color: #d4b44a !important;
    color: var(--gold-400) !important;
    font-weight: 600;
}

.text-accent:hover {
    color: #e2c96e !important;
    color: var(--gold-300) !important;
    text-decoration: none;
}

/* Dropdown */
.navbar-main .dropdown-menu {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 6px;
    margin-top: 4px;
    min-width: 220px;
    animation: dropdownFade var(--duration-normal) var(--ease-out);
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar-main .dropdown-item {
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #1a2332;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) ease;
}

.navbar-main .dropdown-item:hover,
.navbar-main .dropdown-item:focus {
    background-color: #f7f8fb;
    color: #162240;
}

.navbar-main .dropdown-item::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 3px;
    background: #c9a227;
    background: var(--gold-500);
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    opacity: 0;
    transition: opacity var(--duration-fast) ease;
}

.navbar-main .dropdown-item:hover::before {
    opacity: 1;
}

/* ==========================================================================
   Hero Section (Home Page)
   ========================================================================== */

.hero-section {
    background: linear-gradient(135deg, #0a1128 0%, #162240 40%, #1e3055 100%);
    color: #fff;
    padding: 4.5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 162, 39, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(74, 127, 212, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(201, 162, 39, 0.3) 50%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201, 162, 39, 0.12);
    border: 1px solid rgba(201, 162, 39, 0.2);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #d4b44a;
    color: var(--gold-400);
    margin-bottom: 1.5rem;
}

.hero-badge .icon-star::before {
    content: "\2605";
    font-size: 14px;
    line-height: 1;
}

.hero-section h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.hero-section h1 .gold-text {
    color: #c9a227;
    color: var(--gold-500);
}

.hero-section .hero-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    max-width: 640px;
    margin-bottom: 0;
}

.hero-section .hero-description a {
    color: #d4b44a;
    color: var(--gold-400);
    font-weight: 600;
    border-bottom: 1px solid rgba(212, 180, 74, 0.3);
    transition: all var(--duration-fast) ease;
}

.hero-section .hero-description a:hover {
    color: #e2c96e;
    border-bottom-color: #e2c96e;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stat-item {
    text-align: left;
}

.hero-stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}

.hero-stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
}

/* Decorative shield on hero — CSS only */
.hero-shield {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    height: 280px;
    opacity: 0.04;
    pointer-events: none;
    font-size: 260px;
    line-height: 280px;
    text-align: center;
    color: #fff;
}

/* ==========================================================================
   Agency Cards Section (Home Page)
   ========================================================================== */

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #162240;
    color: var(--navy-700);
    margin-bottom: 0.25rem;
}

.section-header p {
    color: #5a6b82;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.section-divider {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #c9a227, #d4b44a);
    border-radius: 3px;
    margin-top: 0.75rem;
}

.agency-card {
    background: #fff;
    border: 1px solid #e8ecf2;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
}

.agency-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #d6dce8;
    border-color: var(--border);
}

.agency-card .card-accent {
    height: 3px;
    background: linear-gradient(90deg, #c9a227, #d4b44a);
}

.agency-card .card-body {
    padding: 1.75rem;
}

.agency-card .agency-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #162240, #1e3055);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    font-size: 22px;
    color: #d4b44a;
    color: var(--gold-400);
}

.agency-card .card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #162240;
    color: var(--navy-700);
    margin-bottom: 0.5rem;
}

.agency-card .card-text {
    color: #5a6b82;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.agency-card .card-ori {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8895a7;
    color: var(--text-muted);
    background: #eef1f6;
    background: var(--surface-sunken);
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 1rem;
}

.btn-agency {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #162240, #1e3055);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    width: 100%;
    text-decoration: none;
}

.btn-agency:hover {
    background: linear-gradient(135deg, #1e3055, #2a4070);
    color: #fff;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-agency .icon-arrow::after {
    content: "\203A";
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    transition: transform var(--duration-fast) ease;
    display: inline-block;
}

.btn-agency:hover .icon-arrow::after {
    transform: translateX(3px);
}

/* ==========================================================================
   Page Header (Report Pages)
   ========================================================================== */

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    color: #8895a7;
    color: var(--text-muted);
}

.page-breadcrumb a {
    color: #5a6b82;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--duration-fast) ease;
}

.page-breadcrumb a:hover {
    color: #162240;
    color: var(--navy-700);
}

.page-breadcrumb .separator {
    font-size: 0.75rem;
    color: #d6dce8;
    color: var(--border);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    margin-bottom: 2rem;
    border-bottom: none;
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, #c9a227, #d4b44a);
    border-radius: 3px;
}

.page-header h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: #162240;
    color: var(--navy-700);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.page-header .page-subtitle {
    font-size: 0.9rem;
    color: #5a6b82;
    color: var(--text-secondary);
    font-weight: 500;
}

.page-header .agency-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #162240, #1e3055);
    color: #d4b44a;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 14px;
    border-radius: 100px;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.agency-badge .icon-shield::before {
    content: "\25C6";
    font-size: 10px;
    line-height: 1;
}

/* Back link pill with CSS arrow */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #5a6b82;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #e8ecf2;
    border: 1px solid var(--border-light);
    border-radius: 100px;
    transition: all var(--duration-fast) ease;
}

.back-link::before {
    content: "\2190";
    font-size: 14px;
    line-height: 1;
}

.back-link:hover {
    color: #162240;
    color: var(--navy-700);
    background: #eef1f6;
    border-color: #d6dce8;
    text-decoration: none;
}

/* ==========================================================================
   Data Table Card Wrapper
   ========================================================================== */

.table-card {
    background: #fff;
    border: 1px solid #e8ecf2;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.table-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e8ecf2;
    border-bottom: 1px solid var(--border-light);
}

.table-card-header h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #162240;
    color: var(--navy-700);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-card-header h5::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #c9a227, #d4b44a);
    border-radius: 4px;
    flex-shrink: 0;
}

.table-card-header .record-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: #8895a7;
    color: var(--text-muted);
    background: #eef1f6;
    background: var(--surface-sunken);
    padding: 3px 10px;
    border-radius: 100px;
}

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0;
}

/* ==========================================================================
   GridView Tables — Complete Override
   ========================================================================== */

table[id$="GridView1"],
table[id$="GridView2"] {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    border: none !important;
    font-size: 0.88rem;
    background: #fff;
}

/* Header row */
table[id$="GridView1"] th,
table[id$="GridView1"] tr:first-child > td,
table[id$="GridView2"] th,
table[id$="GridView2"] tr:first-child > td {
    background-color: #f7f8fb !important;
    background-color: var(--surface) !important;
    color: #5a6b82 !important;
    color: var(--text-secondary) !important;
    font-weight: 700 !important;
    padding: 0.85rem 1.25rem !important;
    border: none !important;
    border-bottom: 2px solid #d6dce8 !important;
    border-bottom-color: var(--border) !important;
    white-space: nowrap;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    position: sticky;
    top: 0;
    z-index: 5;
}

/* Header sort links */
table[id$="GridView1"] th a,
table[id$="GridView1"] tr:first-child > td a,
table[id$="GridView1"] th a:link,
table[id$="GridView1"] tr:first-child > td a:link,
table[id$="GridView1"] th a:visited,
table[id$="GridView1"] tr:first-child > td a:visited {
    color: #5a6b82 !important;
    text-decoration: none !important;
    padding: 0 !important;
    transition: color var(--duration-fast) ease;
}

table[id$="GridView1"] th a:hover,
table[id$="GridView1"] tr:first-child > td a:hover {
    color: #162240 !important;
    color: var(--navy-700) !important;
}

/* Data cells */
table[id$="GridView1"] td,
table[id$="GridView2"] td {
    padding: 0.75rem 1.25rem !important;
    border-top: none !important;
    border-bottom: 1px solid #e8ecf2 !important;
    border-bottom-color: var(--border-light) !important;
    border-left: none !important;
    border-right: none !important;
    vertical-align: middle !important;
    color: #1a2332;
    color: var(--text-primary);
}

/* Skip styling the first row's TDs as data (they're headers) */
table[id$="GridView1"] tr:first-child > td {
    color: #5a6b82 !important;
}

/* Alternating rows */
table[id$="GridView1"] tr:nth-child(even):not(:first-child) td {
    background-color: #fafbfd !important;
}

/* Hover state */
table[id$="GridView1"] tr:not(:first-child):hover td,
table[id$="GridView2"] tr:not(:first-child):hover td {
    background-color: #f0f4fa !important;
}

/* Selected row */
table[id$="GridView1"] tr[style*="background-color"] td,
table[id$="GridView1"] .selected-row td {
    background-color: #edf2ff !important;
    color: #162240 !important;
    font-weight: 500;
    box-shadow: inset 3px 0 0 #c9a227;
}

/* Select button */
table[id$="GridView1"] input[type="submit"],
table[id$="GridView1"] input[type="button"] {
    background: linear-gradient(135deg, #162240, #1e3055) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    padding: 6px 16px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all var(--duration-fast) ease !important;
    letter-spacing: 0.02em !important;
}

table[id$="GridView1"] input[type="submit"]:hover,
table[id$="GridView1"] input[type="button"]:hover {
    background: linear-gradient(135deg, #1e3055, #2a4070) !important;
    box-shadow: var(--shadow-sm) !important;
}

/* Pager row */
table[id$="GridView1"] tr.pager-row td,
table[id$="GridView1"] tr:last-child td[colspan] {
    background-color: #fff !important;
    padding: 1rem 1.25rem !important;
    border-top: 2px solid #e8ecf2 !important;
    border-bottom: none !important;
}

table[id$="GridView1"] tr.pager-row td table td,
table[id$="GridView1"] td[colspan] table td {
    padding: 0 4px !important;
    border: none !important;
    background: transparent !important;
}

table[id$="GridView1"] td[colspan] table a,
table[id$="GridView1"] td[colspan] table span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    text-align: center;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--duration-fast) ease;
}

table[id$="GridView1"] td[colspan] table a {
    color: #5a6b82;
    text-decoration: none;
    background: #eef1f6;
}

table[id$="GridView1"] td[colspan] table a:hover {
    background: #162240;
    color: #fff;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

/* Current page number */
table[id$="GridView1"] td[colspan] table span {
    background: linear-gradient(135deg, #162240, #1e3055);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Details Section (Subject Info & Narrative)
   ========================================================================== */

.details-section {
    margin-top: 0;
}

.details-section h5 {
    font-size: 1rem;
    font-weight: 700;
    color: #162240;
    color: var(--navy-700);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details-section h5::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #c9a227, #d4b44a);
    border-radius: 4px;
}

.detail-card {
    background: #fff;
    border: 1px solid #e8ecf2;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

/* DetailsView */
table[id$="DetailsView1"] {
    width: 100% !important;
    border-collapse: collapse !important;
    border: none !important;
    background-color: #fff !important;
}

table[id$="DetailsView1"] th {
    background-color: #f7f8fb !important;
    color: #5a6b82 !important;
    font-weight: 700 !important;
    padding: 1rem 1.25rem !important;
    border-bottom: 1px solid #e8ecf2 !important;
    white-space: nowrap !important;
    vertical-align: top !important;
    width: 150px !important;
    font-size: 0.82rem;
    text-align: left !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

table[id$="DetailsView1"] td {
    padding: 1rem 1.25rem !important;
    border-bottom: 1px solid #e8ecf2 !important;
    line-height: 1.7 !important;
    font-size: 0.92rem;
    color: #1a2332;
}

/* Subject info GridView2 */
table[id$="GridView2"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

table[id$="GridView2"] th,
table[id$="GridView2"] tr:first-child > td {
    font-size: 0.72rem !important;
    padding: 0.7rem 1rem !important;
}

table[id$="GridView2"] td {
    font-size: 0.88rem;
    padding: 0.7rem 1rem !important;
}

/* ==========================================================================
   Auth Pages (Login, Register, Manage)
   ========================================================================== */

.auth-container {
    max-width: 460px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.auth-card {
    background: #fff;
    border: 1px solid #e8ecf2;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.auth-card-header {
    background: linear-gradient(135deg, #0a1128 0%, #162240 50%, #1e3055 100%);
    color: #fff;
    padding: 2.25rem 2rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 120%, rgba(201, 162, 39, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.auth-card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 10%, #c9a227 50%, transparent 90%);
    opacity: 0.5;
}

.auth-card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
    color: #fff;
    position: relative;
}

.auth-card-header p {
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0;
    font-size: 0.88rem;
    margin-top: 0.5rem;
    position: relative;
}

.auth-card-body {
    padding: 2.25rem;
}

.auth-card-body fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.auth-card-body fieldset legend {
    display: none;
}

.auth-card-body fieldset ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-card-body fieldset ol li {
    margin-bottom: 1.25rem;
}

.auth-card-body label {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    color: #5a6b82;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-card-body label.checkbox {
    display: inline;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.9rem;
    color: #1a2332;
}

.auth-card-body input[type="text"],
.auth-card-body input[type="password"],
.auth-card-body input[type="email"] {
    display: block;
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1.5px solid #d6dce8;
    border-color: var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) ease;
    background-color: #fff;
    color: #1a2332;
    box-sizing: border-box;
}

.auth-card-body input[type="text"]:focus,
.auth-card-body input[type="password"]:focus,
.auth-card-body input[type="email"]:focus {
    border-color: #c9a227;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
    outline: none;
}

.auth-card-body input[type="checkbox"] {
    width: auto;
    border: inherit;
    background: transparent;
    margin-right: 0.35rem;
    accent-color: #162240;
}

.auth-card-body input[type="submit"],
.auth-card-body input[type="button"],
.auth-card-body button {
    background: linear-gradient(135deg, #162240, #1e3055);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    width: 100%;
    margin-top: 0.75rem;
    letter-spacing: 0.02em;
}

.auth-card-body input[type="submit"]:hover,
.auth-card-body input[type="button"]:hover,
.auth-card-body button:hover {
    background: linear-gradient(135deg, #1e3055, #2a4070);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.auth-card-body .message-info {
    background-color: #fdf6e3;
    background-color: var(--gold-100);
    border: 1px solid rgba(201, 162, 39, 0.25);
    color: #a8871e;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.auth-card-body .validation-summary-errors,
.auth-card-body .field-validation-error {
    color: #d94452;
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 600;
}

.auth-footer {
    text-align: center;
    padding: 1.25rem 2rem 1.5rem;
    font-size: 0.88rem;
    color: #5a6b82;
    color: var(--text-secondary);
    border-top: 1px solid #e8ecf2;
    border-top-color: var(--border-light);
    background: #fafbfd;
}

.auth-footer a {
    color: #162240;
    color: var(--navy-700);
    font-weight: 700;
}

.auth-footer a:hover {
    color: #c9a227;
    color: var(--gold-500);
}

/* Registration form wider */
.register-container {
    max-width: 560px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.auth-card-body table {
    border: none;
    width: 100%;
}

.auth-card-body table td {
    padding: 0.5rem 0;
    border: none;
    font-size: 0.95rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: linear-gradient(180deg, #0f1a33 0%, #0a1128 100%);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    position: relative;
    margin-top: 2rem;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #c9a227 50%, transparent 100%);
    opacity: 0.4;
}

.footer-main {
    padding: 2.5rem 0 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-brand img {
    height: 32px;
    width: auto;
    opacity: 0.7;
}

.footer-brand-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

.footer-description {
    font-size: 0.82rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.4);
    max-width: 300px;
}

.footer-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color var(--duration-fast) ease;
}

.footer-links a:hover {
    color: #d4b44a;
    color: var(--gold-400);
}

.footer-bottom {
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.gold-text {
    color: #c9a227;
    color: var(--gold-500);
}

.text-light-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Generic card wrapper for content sections */
.content-card {
    background: #fff;
    border: 1px solid #e8ecf2;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Badge/pill component */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 100px;
}

.status-badge-gold {
    background: rgba(201, 162, 39, 0.1);
    color: #a8871e;
    border: 1px solid rgba(201, 162, 39, 0.2);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #8895a7;
    color: var(--text-muted);
}

/* Registration complete checkmark */
.registration-complete-icon {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    line-height: 48px;
    text-align: center;
    font-size: 32px;
    color: #2d9d6f;
}

.empty-state p {
    font-size: 0.92rem;
    margin: 0;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp var(--duration-slow) var(--ease-out) both;
}

.fade-in-up-delay-1 { animation-delay: 80ms; }
.fade-in-up-delay-2 { animation-delay: 160ms; }
.fade-in-up-delay-3 { animation-delay: 240ms; }
.fade-in-up-delay-4 { animation-delay: 320ms; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 992px) {
    .hero-section {
        padding: 3rem 0 2.5rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .hero-shield {
        display: none;
    }

    .page-header {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2.5rem 0 2rem;
    }

    .hero-section h1 {
        font-size: 1.65rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .page-header h2 {
        font-size: 1.35rem;
    }

    .table-container {
        margin: 0 -1px;
        border-radius: 0;
    }

    .auth-container,
    .register-container {
        margin: 2rem auto;
    }

    .auth-card-body {
        padding: 1.75rem;
    }

    .top-bar {
        display: none;
    }

    .navbar-main .navbar-brand {
        padding: 10px 0;
    }

    .brand-text .brand-title {
        font-size: 0.88rem;
    }

    .brand-text .brand-subtitle {
        display: none;
    }

    .footer-main .row > div {
        margin-bottom: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .brand-badge {
        height: 36px;
    }

    .brand-text .brand-title {
        font-size: 0.82rem;
    }

    table[id$="GridView1"] th,
    table[id$="GridView1"] tr:first-child > td,
    table[id$="GridView1"] td {
        padding: 0.6rem 0.75rem !important;
        font-size: 0.82rem !important;
    }

    table[id$="GridView1"] input[type="submit"],
    table[id$="GridView1"] input[type="button"] {
        padding: 5px 10px !important;
        font-size: 0.72rem !important;
    }

    .hero-section h1 {
        font-size: 1.4rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .hero-stat-number {
        font-size: 1.35rem;
    }
}
