/* =========================================
   GLOBAL VARIABLES & RESETS
   ========================================= */
:root {
    --brand-primary: #e63946; 
    --brand-dark: #1d3557;
    --brand-light: #f8f9fa;
    --brand-accent: #457b9d;
    --text-main: #333333;
    --border-color: #dee2e6;
    --bg-main: #f4f7f6;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Noto Sans Gujarati', sans-serif; 
}

body { 
    background-color: var(--bg-main); 
    color: var(--text-main); 
    line-height: 1.6; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { 
    text-decoration: none; 
    color: var(--brand-primary); 
    transition: 0.3s;
}

a:hover { 
    text-decoration: underline; 
}

/* =========================================
   HEADER
   ========================================= */
.header { 
    background: #ffffff;
    padding: 1.5rem 5%; 
    text-align: center; 
    border-bottom: 1px solid var(--border-color); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-dark);
    text-decoration: none;
}

.header h3 { 
    color: var(--brand-dark); 
    margin-top: 10px; 
    font-weight: 700; 
}

/* =========================================
   AUTHENTICATION & REGISTRATION FORMS
   ========================================= */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 5%;
}

.auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 450px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    padding: 2.5rem;
    border-top: 5px solid var(--brand-primary);
    text-align: center;
}

.reg-card {
    background: #ffffff;
    width: 100% !important;
    max-width: none;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    padding: 2.5rem;
    border-top: 5px solid var(--brand-primary);
}

.reg-header { text-align: center; margin-bottom: 2rem; }
.reg-header h2 { color: var(--brand-dark); font-size: 1.8rem; margin-bottom: 0.5rem; }
.reg-header p { color: #64748b; font-size: 0.95rem; }
.uid-badge { 
    display: inline-block; 
    background: #e2e8f0; 
    color: var(--brand-dark); 
    padding: 5px 12px; 
    border-radius: 20px; 
    font-weight: 600; 
    font-size: 0.85rem; 
    margin-top: 10px;
}

.form-group { margin-bottom: 1.2rem; text-align: left; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--brand-dark); font-size: 0.9rem; }
.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: 0.3s;
}
.form-control:focus { border-color: var(--brand-primary); outline: none; box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1); }

.btn-submit {
    display: block;
    width: 100%;
    background: var(--brand-primary);
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 1rem;
}
.btn-submit:hover { background: #d62828; }

.file-upload-wrapper { position: relative; overflow: hidden; display: inline-block; width: 100%; }
.file-upload-wrapper input[type="file"] { font-size: 100px; position: absolute; left: 0; top: 0; opacity: 0; cursor: pointer; height: 100%; }
.btn-upload { background: var(--brand-light); border: 2px dashed var(--border-color); color: var(--brand-dark); width: 100%; padding: 15px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: 0.3s; }
.file-upload-wrapper:hover .btn-upload { border-color: var(--brand-primary); color: var(--brand-primary); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }

/* Alerts */
.alert-success { background: #dcfce7; color: #166534; padding: 15px; border-radius: 8px; margin-bottom: 20px; font-weight: 600; text-align: center; }
.alert-error { background: #fee2e2; color: #b91c1c; padding: 15px; border-radius: 8px; margin-bottom: 20px; font-weight: 600; text-align: center; }

/* =========================================
   DASHBOARD SPECIFIC STYLES
   ========================================= */
.page-title { 
    background-color: var(--brand-light); 
    padding: 2rem 5%; 
    text-align: center; 
    border-bottom: 1px solid var(--border-color); 
}
.page-title h1 { font-size: 1.8rem; color: var(--brand-dark); }

.page-menu { 
    background: #ffffff; 
    border-bottom: 1px solid var(--border-color); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}
.page-menu-list { 
    display: flex; 
    justify-content: center; 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    flex-wrap: wrap;
}
.page-menu-list li a { 
    display: block; 
    padding: 15px 20px; 
    color: #555; 
    font-weight: 600; 
    font-size: 0.95rem; 
    border-bottom: 3px solid transparent;
	transition: border-color 0.2s ease-in-out;
}
.page-menu-list li a:hover, .page-menu-list li a.active { 
    color: var(--brand-primary); 
    border-bottom: 3px solid var(--brand-primary); 
    text-decoration: none;
}

.dashboard-container {
	width: 100%;
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 30px 20px; 
    box-sizing: border-box;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 9fr; 
    gap: 30px;
    align-items: start;
    width: 100%;
}
.dashboard-grid main {
    width: 100%;
    min-width: 0; 
}

.dashboard-grid .reg-card {
    width: 100% !important;
    max-width: none !important; 
    box-sizing: border-box;
}

/* Sidebar Profile */
.profile-img-container { 
    width: 100%; 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    margin-bottom: 20px; 
}
.profile-img-container img { width: 100%; height: auto; display: block; }

.profile-card { 
    border: 1px solid var(--border-color); 
    padding: 20px; 
    border-radius: 8px; 
    text-align: center; 
    margin-bottom: 20px; 
    background: #ffffff;
}
.profile-card h3 { margin-bottom: 5px; color: var(--brand-dark); font-size: 1.4rem;}
.profile-card h4 { color: #6c757d; font-weight: 400; font-size: 1rem; }
.line { height: 1px; background: var(--border-color); margin: 15px 0; }

.btn-signout { 
    display: block; 
    background: #333; 
    color: #fff; 
    text-align: center; 
    padding: 12px; 
    border-radius: 5px; 
    font-weight: 600; 
}
.btn-signout:hover { 
    background: var(--brand-primary); 
    color: #fff; 
    text-decoration: none; 
}

/* Dashboard Content Areas */
.info-box { margin-bottom: 20px; }
.info-box h4 { font-size: 1.1rem; margin-bottom: 5px; color: var(--brand-dark); }
.info-box p { font-size: 0.95rem; }

.stats-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 30px; 
    margin-top: 30px; 
}

.stat-card { 
    background: #ffffff; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    padding: 30px; 
    text-align: left; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.stat-card h2 { 
    font-size: 1.2rem; 
    margin-bottom: 10px; 
    font-weight: 400; 
    color: #555; 
}
.stat-card h2 span { font-weight: 700; color: var(--brand-dark); }

.btn-enter-points { 
    display: inline-block; 
    background: var(--brand-dark); 
    color: #fff; 
    padding: 10px 20px; 
    border-radius: 5px; 
    margin-top: 15px; 
    font-weight: 600; 
    font-size: 0.9rem;
}
.btn-enter-points:hover { 
    background: #111; 
    color: #fff; 
    text-decoration: none;
}

ul.rules-list { 
    list-style-type: disc; 
    padding-left: 20px; 
    margin-top: 15px; 
    color: #555; 
}
ul.rules-list li { margin-bottom: 8px; }

/* =========================================
   FOOTER
   ========================================= */
.footer { 
    background: #111; 
    color: #aaa; 
    padding: 40px 5%; 
    font-size: 0.9rem; 
    margin-top: auto;
}
.footer-grid { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 20px;
}
.footer a { color: #ddd; }
.footer a:hover { color: #fff; }

/* =========================================
   RESPONSIVE QUERIES
   ========================================= */
@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr; /* Switch to a single column */
    }
}

@media (max-width: 600px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .footer-grid { flex-direction: column; text-align: center; }
    .footer-grid div { text-align: center !important; }
}