/* style.css - Premium Stylesheet for Delhi University Student Portal & Admin Panel */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;800&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,700;1,400&family=Dancing+Script:wght@700&display=swap');

/* Color Variables */
:root {
    --du-blue: #1e5ba4;
    --du-blue-hover: #15457e;
    --du-dark-blue: #0b2f5c;
    --du-burgundy: #851c1c;
    --du-green: #24a148;
    --du-green-hover: #1c7e37;
    --bg-light: #f4f6f9;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #cbd5e1;
    --border-focus: #3b82f6;
    --sidebar-bg: #ffffff;
    --sidebar-text: #334155;
    --sidebar-hover: #f1f5f9;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.25s ease-in-out;
}

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button, input, select {
    font-family: inherit;
}

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

/* --- LOGIN PAGE STYLES --- */
.login-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f3f4f6;
}

.login-header {
    padding: 1rem 2rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--du-blue);
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.login-card {
    background: #ffffff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    border-top: 4px solid var(--du-blue);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.du-logo-container {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.du-logo-svg {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.portal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2rem;
}

.login-form-title {
    text-align: left;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.5rem;
}

.form-group {
    text-align: left;
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--du-blue);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--du-blue);
    box-shadow: 0 0 0 3px rgba(30, 91, 164, 0.15);
}

.error-text {
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 0.25rem;
    display: none;
}

.login-btn-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--du-blue);
}

.btn-secondary-group {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-green {
    flex: 1;
    background-color: var(--du-green);
    color: white;
    border: none;
    padding: 0.65rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-green:hover {
    background-color: var(--du-green-hover);
}

.btn-outline {
    flex: 1;
    background-color: transparent;
    color: var(--du-blue);
    border: 1px solid #d1d5db;
    padding: 0.65rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-outline:hover {
    background-color: #f3f4f6;
    border-color: var(--du-blue);
}

.demo-credentials {
    margin-top: 1.5rem;
    padding: 0.75rem;
    background-color: #eff6ff;
    border-radius: var(--radius-sm);
    border: 1px dashed #bfdbfe;
    font-size: 0.8rem;
    color: #1e3a8a;
    text-align: left;
}

.demo-credentials ul {
    margin-left: 1rem;
    margin-top: 0.25rem;
}

/* --- DASHBOARD LAYOUT STYLES --- */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 1.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--du-blue);
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand-logo {
    width: 32px;
    height: 32px;
}

.sidebar-user {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background-color: #fafbfd;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

.sidebar-user-role::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--du-green);
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu-header {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
    padding: 0.5rem 1.5rem;
    letter-spacing: 0.05em;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
    cursor: pointer;
}

.sidebar-item a:hover {
    background-color: var(--sidebar-hover);
    color: var(--du-blue);
}

.sidebar-item.active a {
    background-color: #eff6ff;
    color: var(--du-blue);
    border-left-color: var(--du-blue);
    font-weight: 600;
}

.sidebar-item i {
    margin-right: 0.75rem;
    width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #f1f5f9;
}

.logout-btn {
    width: 100%;
    padding: 0.65rem;
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn:hover {
    background-color: #fee2e2;
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.topbar {
    height: 64px;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    flex-shrink: 0;
}

.topbar-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background-color: var(--bg-light);
}

/* Announcements Box */
.announcement-banner {
    background-color: var(--du-blue);
    color: #ffffff;
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.announcement-title {
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1.5px solid rgba(255,255,255,0.3);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.announcement-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.announcement-item a {
    color: #ffffff;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.9;
    transition: var(--transition);
    text-decoration: underline;
}

.announcement-item a:hover {
    opacity: 1;
    transform: translateX(3px);
}

/* B.Com Course Card */
.course-card {
    background: #ffffff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    max-width: 500px;
    margin-bottom: 2rem;
}

.course-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.click-here-btn {
    display: inline-block;
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.click-here-btn:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

/* Dashboard Profile View Grid */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--du-dark-blue);
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-info-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    border-bottom: 1px dashed #f1f5f9;
    padding-bottom: 0.5rem;
}

.profile-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-info-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.profile-info-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

/* --- STATEMENT OF MARKS SHEET DESIGN --- */
.marksheet-selector {
    background-color: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.tab-btn-group {
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background-color: var(--du-blue);
    color: white;
    border-color: var(--du-blue);
}

.tab-btn:hover:not(.active) {
    background-color: #f1f5f9;
    color: var(--du-blue);
}

.print-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-print {
    background-color: var(--du-burgundy);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-print:hover {
    background-color: #631414;
}

/* The actual sheet container */
.marksheet-outer-container {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid #e2e8f0;
    margin: 0 auto;
    max-width: 900px;
    overflow-x: auto;
}

.marksheet-border {
    border: 3px double var(--du-burgundy);
    padding: 1.5rem;
    position: relative;
    background-color: #fffdfc; /* Subtle parchment feel */
}

/* Header layout */
.marksheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    border-bottom: 1.5px solid var(--du-burgundy);
    padding-bottom: 1rem;
}

.marksheet-logo {
    width: 90px;
    height: 90px;
}

.marksheet-title-area {
    text-align: center;
    flex: 1;
}

.marksheet-serial {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.marksheet-uni-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--du-burgundy);
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.marksheet-uni-loc {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.4rem;
}

.marksheet-doc-type {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--du-burgundy);
    margin-top: 0.5rem;
}

.marksheet-part-title {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    color: #1e293b;
    text-transform: uppercase;
}

/* Student metadata grid */
.marksheet-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
    row-gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.82rem;
    color: #000000;
}

.meta-row {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    border-bottom: 1px dotted #94a3b8;
    padding-bottom: 0.25rem;
}

.meta-label {
    font-weight: 700;
    width: 140px;
    flex-shrink: 0;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.meta-value {
    font-weight: 500;
    font-family: monospace;
    font-size: 0.85rem;
}

/* Table styles */
.marksheet-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    color: #000000;
}

.marksheet-table th, 
.marksheet-table td {
    border: 1px solid #000000;
    padding: 0.45rem 0.6rem;
    text-align: left;
}

.marksheet-table th {
    font-weight: 700;
    background-color: #f8fafc;
    text-transform: uppercase;
    font-size: 0.75rem;
    text-align: center;
}

.marksheet-table td.center {
    text-align: center;
}

.marksheet-table tr.total-row {
    font-weight: 700;
    background-color: #f8fafc;
}

/* Summary Grid (Part I, II, III table) */
.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
}

.summary-table th, 
.summary-table td {
    border: 1px solid #000000;
    padding: 0.45rem 0.6rem;
    text-align: center;
}

.summary-table th {
    font-weight: 700;
    background-color: #f8fafc;
    font-size: 0.75rem;
}

/* Signatures and footer info */
.marksheet-footer-meta {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    border-top: 1.5px solid var(--du-burgundy);
    padding-top: 1rem;
    color: #000000;
}

.footer-meta-col {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-meta-item {
    display: flex;
}

.footer-meta-label {
    font-weight: 700;
    width: 110px;
}

.footer-meta-val {
    font-weight: 500;
}

.marksheet-signatures {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 1.5rem;
    align-items: end;
    text-align: center;
}

.sig-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-height: 80px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #1e293b;
}

.sig-image-placeholder {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: #1e3a8a;
    line-height: 1;
    margin-bottom: 0.5rem;
    transform: rotate(-3deg);
}

.sig-stamp {
    border: 1.5px solid #1e3a8a;
    border-radius: 4px;
    color: #1e3a8a;
    padding: 0.25rem 0.5rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.2;
    transform: rotate(5deg);
    display: inline-block;
    margin-bottom: 0.5rem;
    background-color: rgba(30, 58, 138, 0.05);
}

.sig-stamp.verified {
    border-color: #047857;
    color: #047857;
    transform: rotate(-4deg);
    background-color: rgba(4, 120, 87, 0.05);
}

.sig-label {
    border-top: 1px solid #64748b;
    width: 100%;
    padding-top: 0.35rem;
    text-transform: uppercase;
    font-size: 0.65rem;
    color: #475569;
}

/* --- ADMIN PANEL SPECIFIC STYLES --- */
.admin-header {
    background-color: var(--du-dark-blue);
    color: white;
}

.admin-header .topbar-title {
    color: white;
}

.admin-sidebar {
    background-color: #0f172a;
    color: #94a3b8;
    border-right-color: #1e293b;
}

.admin-sidebar .sidebar-brand {
    color: #ffffff;
    border-bottom-color: #1e293b;
}

.admin-sidebar .sidebar-user {
    background-color: #1e293b;
    border-bottom-color: #334155;
}

.admin-sidebar .sidebar-user-name {
    color: #f8fafc;
}

.admin-sidebar .sidebar-item a {
    color: #94a3b8;
}

.admin-sidebar .sidebar-item a:hover {
    background-color: #1e293b;
    color: #ffffff;
}

.admin-sidebar .sidebar-item.active a {
    background-color: #0f4c81;
    color: #ffffff;
    border-left-color: #3b82f6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.stat-info-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--du-dark-blue);
    margin-top: 0.25rem;
}

.stat-icon {
    font-size: 2rem;
    color: #3b82f6;
    opacity: 0.7;
}

/* Admin editor forms */
.admin-card {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.admin-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fafbfc;
}

.admin-card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--du-dark-blue);
}

.admin-card-body {
    padding: 1.5rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

/* Edit Marks Section */
.admin-parts-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-section {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.accordion-header {
    background-color: #f8fafc;
    padding: 1rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.accordion-header:hover {
    background-color: #f1f5f9;
}

.accordion-content {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.marks-edit-table {
    width: 100%;
    border-collapse: collapse;
}

.marks-edit-table th,
.marks-edit-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.marks-edit-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.marks-input {
    width: 80px;
    padding: 0.4rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    text-align: center;
}

.marks-input:focus {
    border-color: var(--border-focus);
    outline: none;
}

.admin-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #1e293b;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--du-green);
}

.toast-error {
    border-left: 4px solid #dc2626;
}

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Student Photos Gallery */
.student-photos-gallery {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.student-photo-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.photo-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.photo-wrapper {
    width: 220px;
    height: 220px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #fafbfd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.photo-wrapper:hover {
    border-color: var(--du-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.profile-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.photo-placeholder {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

.photo-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

/* Photo previews inside admin panel */
.photo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- PRINT MEDIA STYLES --- */
@media print {
    /* Hide everything else */
    body, html {
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    .sidebar,
    .topbar,
    .marksheet-selector,
    .announcement-banner,
    .course-card,
    .profile-grid,
    .admin-card,
    .stats-grid,
    .admin-actions,
    .print-actions {
        display: none !important;
    }

    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        overflow: visible !important;
    }

    .main-wrapper {
        display: block !important;
        overflow: visible !important;
    }

    .marksheet-outer-container {
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow: visible !important;
    }

    .marksheet-border {
        border: 3px double var(--du-burgundy) !important;
        background-color: #ffffff !important;
        padding: 1.5rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Keep the red/burgundy coloring in prints */
    .marksheet-uni-name,
    .marksheet-doc-type,
    .marksheet-border,
    .marksheet-header {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .sidebar-brand {
        padding: 1rem;
    }

    .sidebar-menu {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 0.5rem;
        gap: 0.25rem;
    }

    .sidebar-menu-header {
        display: none;
    }

    .sidebar-item a {
        padding: 0.5rem 1rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: var(--radius-sm);
        white-space: nowrap;
    }

    .sidebar-item.active a {
        border-left-color: transparent;
        border-bottom-color: var(--du-blue);
    }

    .sidebar-user, .sidebar-footer {
        display: none;
    }

    .main-content {
        padding: 1rem;
    }

    .marksheet-outer-container {
        padding: 1rem;
    }

    .marksheet-meta-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Digital Signature Styles */
.digital-signature-box {
    border: 1.5px solid #00c853;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    background-color: rgba(0, 200, 83, 0.04);
    color: #1b5e20;
    font-family: monospace, Courier, sans-serif;
    font-size: 0.62rem;
    text-align: left;
    display: inline-block;
    width: 100%;
    max-width: 250px;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-left: 4px solid #00c853;
}

.digital-signature-title {
    color: #2e7d32;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.digital-signature-title i {
    color: #00c853;
    font-size: 0.75rem;
}

/* Supabase Configuration Panel Styling */
.supabase-config-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border-top: 4px solid #3ecf8e; /* Supabase Green */
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.supabase-config-header {
    background-color: #fcfdfe;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.supabase-config-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.supabase-config-header h3 i {
    color: #3ecf8e;
}

.supabase-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.supabase-status-badge.connected {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.supabase-status-badge.disconnected {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

