/* ==========================================================================
   CSS Reset & Variables (Single Page Dashboard version) - Extended Font Sizes
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2ea44f;
    --primary-dark: #238636;
    --secondary: #f7a048;
    --text-main: #2d3748;
    --text-muted: #718096;
    --bg-main: #edf2f7; /* Slightly darker cool background for dashboard feel */
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

/* Base Body (Allow slight scroll) */
.dashboard-body {
    font-family: 'Pretendard', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden; 
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

ul { list-style: none; }

/* ==========================================================================
   Header Area (Fixed Height, Top)
   ========================================================================== */
.dash-header {
    height: 80px; /* Thicker header for big fonts */
    background: var(--card-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    z-index: 10;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 36px;
    color: var(--primary);
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-text span {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.2;
}

.logo-text strong {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
}

.main-nav > ul {
    display: flex;
    gap: 25px;
}

.main-nav a {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 5px 0;
    position: relative;
    transition: color 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary);
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--card-bg);
    min-width: 140px;
    box-shadow: var(--shadow-hover);
    border-radius: 8px;
    z-index: 100;
    text-align: center;
    border: 1px solid var(--border);
    padding: 5px 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.nav-dropdown-menu li {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 15px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    transition: background 0.2s;
}

.nav-dropdown-menu a:hover {
    background-color: var(--bg-main);
    color: var(--primary);
}

.top-utils {
    display: flex;
    gap: 20px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-muted);
}

.top-utils a {
    display: flex;
    align-items: center;
    gap: 6px;
}
.top-utils a:hover { color: var(--primary); }

/* ==========================================================================
   Main Grid Area (Bottom 90% space)
   ========================================================================== */
.dash-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 3fr 3.5fr 2.5fr; /* 3 Column split */
    gap: 15px;
    padding: 15px;
    padding-bottom: 40px; /* Add some extra breathing space at the bottom */
    min-height: calc(100vh - 80px); /* Fill screen as minimum, but allow expanding */
}

.dash-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Reusable dashboard card */
.dash-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 24px;
    font-weight: 800;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title-sm {
    font-size: 22px;
    font-weight: 800;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}

/* --------------------------------------------------------------------------
   Left Column
   -------------------------------------------------------------------------- */
.hero-card {
    flex: 0.6;
    background-size: cover;
    background-position: center;
    color: white;
    position: relative;
    display: flex;
    align-items: center; /* Center vertically */
    justify-content: flex-start; /* Align to left */
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 40px; /* Give it some breathing room from the edges */
    max-width: 80%;
}

.hero-content h1 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 20px;
    font-weight: 500;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* --------------------------------------------------------------------------
   Center Column
   -------------------------------------------------------------------------- */
.board-card {
    flex: 1;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 15px 0;
    background: #f8fafc;
    border: none;
    border-right: 1px solid var(--border);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn:last-child { border-right: none; }

.tab-btn.active {
    background: var(--card-bg);
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

.tab-container {
    flex-grow: 1;
    overflow-y: auto; /* Internal scrolling list */
    padding: 0 20px;
}

.tab-content { display: none; padding: 10px 0;}
.tab-content.active { display: block; animation: fadeIn 0.3s; }

@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }

.board-list.dense li {
    padding: 15px 0;
    border-bottom: 1px dashed var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
}
.board-list.dense li:last-child { border-bottom: none; }

.board-list.dense a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    margin-right: 15px;
}
.board-list.dense a:hover { color: var(--primary); text-decoration: underline; }

.badge { padding: 4px 10px; border-radius: 6px; font-size: 16px; font-weight: 800; color: #fff;}
.badge.new { background: #ef4444; }
.badge.in-progress { background: var(--secondary); }

.date, .author { color: var(--text-muted); font-size: 18px; font-weight: 500; flex-shrink: 0;}

.event-card {
    flex: 1;
    background-size: cover;
    background-position: center;
}
.event-desc {
    margin-top: auto;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 20px;
}
.event-desc h4 { font-size: 26px; font-weight: 800; margin: 8px 0; }
.event-desc p { font-size: 18px; font-weight: 500; opacity: 0.9; }
.badge-tag { display: inline-block; background: var(--primary); padding: 4px 10px; border-radius: 6px; font-size: 16px; font-weight: 800;}

/* --------------------------------------------------------------------------
   Right Column
   -------------------------------------------------------------------------- */
.history-card {
    flex: 1.2;
}

.history-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.history-img-sm {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
}

.history-txt {
    font-size: 20px;
    color: var(--text-main);
    font-weight: 500;
    line-height: 1.6;
}

.leader-mini-list {
    background: var(--bg-main);
    padding: 15px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.l-item b { color: var(--primary-dark); display: inline-block; width: 75px; font-weight: 800; }

.gallery-card-mini {
    flex: 1;
}

.gallery-grid-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 20px;
    height: 100%;
}

.g-item {
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    min-height: 80px;
    background: #eee;
}
.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.g-item:hover img { transform: scale(1.1); }
.g-item.empty { display: flex; align-items: center; justify-content: center; font-size: 40px; color: #ccc;}

.more { color: var(--text-muted); text-decoration: none; font-size: 28px; line-height: 1; font-weight: 400;}
.more:hover { color: var(--primary); }

.mini-footer {
    margin-top: auto;
    font-size: 18px;
    color: var(--text-muted);
    font-weight: 500;
    text-align: right;
    line-height: 1.5;
    padding-right: 5px;
}
.mini-footer .copyright { margin-top: 6px; font-weight: 700; opacity: 0.6; }

/* --------------------------------------------------------------------------
   Highlight Animation for Navigation
   -------------------------------------------------------------------------- */
@keyframes pulseHighlight {
    0% { box-shadow: 0 0 0 0 rgba(46, 164, 79, 0.7); border-color: transparent; transform: scale(1); }
    50% { box-shadow: 0 0 0 15px rgba(46, 164, 79, 0); border-color: var(--primary); transform: scale(1.02); }
    100% { box-shadow: 0 0 0 0 rgba(46, 164, 79, 0); border-color: transparent; transform: scale(1); }
}

.highlight-pulse {
    animation: pulseHighlight 1s ease-out;
    border: 2px solid var(--primary) !important;
}

/* --- Sub Pages Common Layout --- */
.sub-page-body {
    font-family: 'Pretendard', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    min-height: 100vh;
}

.sub-main {
    padding-top: 0;
}

.sub-hero {
    height: 300px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.sub-hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 10px;
}

.sub-hero p {
    font-size: 20px;
    opacity: 0.9;
}

.content-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.content-header {
    border-left: 5px solid var(--primary);
    padding-left: 20px;
    margin-bottom: 30px;
}

.board-table {
    background: white;
}

.board-table th, .board-table td {
    border-bottom: 1px solid var(--border);
}
.auth-body {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 10px;
}

.auth-header h1 {
    font-size: 24px;
    color: var(--primary-dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 8px;
}

.input-with-btn {
    display: flex;
    gap: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.btn-form {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary-form {
    background: var(--primary);
    color: white;
}

.btn-primary-form:hover {
    background: var(--primary-dark);
}

.btn-outline-form {
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline-form:hover {
    background: #f0fdf4;
}

.btn-sm-form {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
    white-space: nowrap;
}

.auth-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* --- Real-name Verification UI --- */
.verify-section {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.verify-status {
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.verify-status.success {
    color: #059669;
    display: block;
}

.verify-status.error {
    color: #dc2626;
    display: block;
}


.success-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 5px;
}

/* --- Badge / Rank System --- */
.badge-rank {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    margin-right: 6px;
    vertical-align: middle;
    line-height: 1.2;
    transform: translateY(-1px);
}

.rank-leader {
    background: #fbbf24;
    color: #78350f;
}

.rank-officer {
    background: #3b82f6;
    color: white;
}

.rank-resident {
    background: #e5e7eb;
    color: #4b5563;
}
