/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #070b13;
    --bg-deep: #0b111e;
    --glass-bg: rgba(13, 22, 38, 0.65);
    --glass-border: rgba(223, 177, 91, 0.2);
    --glass-border-hover: rgba(223, 177, 91, 0.5);
    
    --gold: #dfb15b;
    --gold-glow: rgba(223, 177, 91, 0.35);
    --gold-hover: #f0cf8e;
    
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    
    --font-magic: 'Cinzel', serif;
    --font-ui: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(13, 25, 48, 0.8) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(31, 23, 15, 0.5) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(10, 18, 32, 0.9) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-ui);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header & Nav */
header {
    background: rgba(7, 11, 19, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-magic);
    color: var(--gold);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--gold-glow);
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: -2px;
}

.logo-group {
    display: flex;
    flex-direction: column;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-tag {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.user-tag strong {
    color: var(--gold);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(135deg, #dfb15b 0%, #b88d3d 100%);
    color: #070b13;
    border: none;
    box-shadow: 0 4px 15px rgba(223, 177, 91, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f0cf8e 0%, #dfb15b 100%);
    box-shadow: 0 4px 20px rgba(223, 177, 91, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
    background: rgba(223, 177, 91, 0.05);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.4);
    border-color: #ef4444;
    transform: translateY(-2px);
}

.btn-success {
    background: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    background: rgba(16, 185, 129, 0.4);
    border-color: #10b981;
    transform: translateY(-2px);
}

/* Page Layout */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 2.5rem auto;
    padding: 0 2rem;
}

/* Glass Card */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: border-color 0.3s, box-shadow 0.3s;
    margin-bottom: 2rem;
}

.card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 32px 0 rgba(223, 177, 91, 0.1);
}

.card-title {
    font-family: var(--font-magic);
    color: var(--gold);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(223, 177, 91, 0.15);
    padding-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-control {
    width: 100%;
    background: rgba(7, 11, 19, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    color: var(--text-white);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(223, 177, 91, 0.25);
    background: rgba(7, 11, 19, 0.8);
}

.form-control::placeholder {
    color: #4b5563;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Auth Screens */
.auth-wrapper {
    max-width: 480px;
    width: 100%;
    margin: 5rem auto;
    padding: 0 1rem;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo h1 {
    font-family: var(--font-magic);
    color: var(--gold);
    font-size: 2.2rem;
    letter-spacing: 3px;
    text-shadow: 0 0 15px var(--gold-glow);
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 5px;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alert States */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-danger {
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

.alert-warning {
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fde047;
}

/* Approval Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
}

.badge-pending {
    background: var(--warning-bg);
    color: #fbe094;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-approved {
    background: var(--success-bg);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.badge-rejected {
    background: var(--danger-bg);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Onay Formu / Image Display */
.approval-form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.document-container {
    position: relative;
    border: 2px solid var(--gold);
    box-shadow: 0 0 25px var(--gold-glow);
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
    display: inline-block;
}

.document-image {
    display: block;
    max-width: 100%;
    max-height: 400px;
    height: auto;
    object-fit: contain;
    transition: filter 0.5s ease;
}

/* Watermark Stamps */
.stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-family: var(--font-magic);
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 10;
}

.document-container.approved .stamp-approved {
    opacity: 0.85;
    color: #4caf50;
    border: 5px double #4caf50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.2);
    animation: stamp-slam 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.document-container.rejected .stamp-rejected {
    opacity: 0.85;
    color: #f44336;
    border: 5px double #f44336;
    text-shadow: 0 0 10px rgba(244, 67, 54, 0.4);
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.2);
    animation: stamp-slam 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.document-container.approved .document-image {
    filter: sepia(0.2) saturate(1.2) contrast(1.1);
}

.document-container.rejected .document-image {
    filter: grayscale(0.8) contrast(1.2);
}

@keyframes stamp-slam {
    0% {
        transform: translate(-50%, -50%) scale(3) rotate(-45deg);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(-15deg);
        opacity: 0.85;
    }
}

/* Schedule Table */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.schedule-table th, .schedule-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(223, 177, 91, 0.1);
}

.schedule-table th {
    font-family: var(--font-magic);
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.schedule-table tr {
    transition: background 0.3s;
}

.schedule-table tr:hover td {
    background: rgba(223, 177, 91, 0.03);
}

.schedule-day {
    font-weight: 700;
    color: var(--gold-hover);
}

.schedule-time {
    color: var(--text-muted);
    font-family: var(--font-ui);
}

/* Pseudonym (Takma Ad) Cards */
.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.student-card {
    background: rgba(20, 27, 45, 0.4);
    border: 1px solid rgba(223, 177, 91, 0.15);
    border-radius: 6px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.student-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 5px 15px rgba(223, 177, 91, 0.15);
    background: rgba(20, 27, 45, 0.7);
}

.student-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 1.25rem;
    box-shadow: 0 0 10px rgba(223, 177, 91, 0.2);
}

.student-name {
    font-family: var(--font-magic);
    font-size: 1.05rem;
    color: var(--text-white);
    letter-spacing: 1px;
}

.student-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Token Management styles */
.token-list-container {
    max-height: 250px;
    overflow-y: auto;
    margin-top: 1rem;
    padding-right: 0.5rem;
}

.token-list-container::-webkit-scrollbar {
    width: 6px;
}

.token-list-container::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.token-list-container::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

.token-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.token-code {
    font-family: monospace;
    font-size: 1rem;
    color: var(--gold-hover);
    letter-spacing: 1px;
}

/* Notifications Box */
.notification-bell {
    position: relative;
    cursor: pointer;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-list {
    margin-top: 1rem;
}

.notification-item {
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--gold);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0 4px 4px 0;
    transition: all 0.3s;
}

.notification-item.unread {
    background: rgba(223, 177, 91, 0.04);
    border-left-color: var(--gold);
}

.notification-item.unread:hover {
    background: rgba(223, 177, 91, 0.08);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Footer styling */
footer {
    background: rgba(7, 11, 19, 0.95);
    border-top: 1px solid var(--glass-border);
    padding: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
    letter-spacing: 2px;
    text-transform: uppercase;
}

footer p strong {
    color: var(--gold);
}
