/* ============================================
   Faculty Profile System - Main Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #e0e0f0;
    min-height: 100vh;
    line-height: 1.7;
}

a {
    color: #a5b4fc;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: #c7d2fe; }

img { max-width: 100%; height: auto; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 24px;
}

/* --- Navigation --- */
.navbar {
    background: rgba(15, 12, 41, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-links a {
    color: #b0b0d0;
    font-size: 0.92rem;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.15);
}

.nav-user {
    color: #8888bb;
    font-size: 0.9rem;
    padding: 6px 10px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #b0b0d0;
    margin: 5px 0;
    border-radius: 2px;
    transition: 0.3s;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff !important;
    border: none;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #c0c0e0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac !important;
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.btn-success:hover {
    background: rgba(34, 197, 94, 0.25);
}

.btn-warning {
    background: rgba(234, 179, 8, 0.15);
    color: #fde68a !important;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.82rem;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- Cards --- */
.card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
    transition: border-color 0.2s;
}
.card:hover {
    border-color: rgba(99, 102, 241, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: #b0b0d0;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #e0e0f0;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.form-control::placeholder {
    color: #666688;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}
.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
}

/* --- Auth Pages --- */
.auth-box {
    max-width: 460px;
    margin: 60px auto;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 40px 36px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-box h1 {
    text-align: center;
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 8px;
}

.auth-box .subtitle {
    text-align: center;
    color: #8888aa;
    margin-bottom: 28px;
    font-size: 0.9rem;
}

.auth-box .auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #8888aa;
}

/* --- Alerts --- */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.alert-warning {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.2);
    color: #fde68a;
}

/* --- Profile Header (Public View) --- */
.profile-header {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 28px;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid rgba(99, 102, 241, 0.4);
    padding: 3px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    object-fit: cover;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.profile-designation {
    font-size: 1.05rem;
    color: #a5b4fc;
    margin-bottom: 6px;
}

.profile-dept {
    font-size: 0.9rem;
    color: #8888bb;
    margin-bottom: 16px;
}

.profile-status-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

/* --- Section Tabs (Public View) --- */
.section-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.section-tabs a {
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    color: #8888bb;
    transition: all 0.2s;
}
.section-tabs a:hover,
.section-tabs a.active {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
}

.section-tabs a .count {
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 8px;
    border-radius: 50px;
    font-size: 0.75rem;
    margin-left: 4px;
}

/* --- Section Content --- */
.section-content {
    display: none;
}
.section-content.active {
    display: block;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Item Cards (for lists) --- */
.item-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 14px;
    transition: all 0.2s;
}
.item-card:hover {
    border-color: rgba(99, 102, 241, 0.15);
}

.item-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #e0e0f0;
    margin-bottom: 6px;
}

.item-card .meta {
    font-size: 0.85rem;
    color: #8888bb;
    margin-bottom: 8px;
}

.item-card .meta span {
    margin-right: 16px;
}

.item-card p {
    color: #b0b0d0;
    font-size: 0.92rem;
    line-height: 1.6;
}

.item-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #8888aa;
}
.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 12px;
}
.empty-state p {
    font-size: 0.95rem;
}

/* --- Tables (Admin) --- */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
}

table th {
    color: #8888bb;
    font-weight: 500;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table td {
    color: #d0d0e8;
}

table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-pending {
    background: rgba(234, 179, 8, 0.15);
    color: #fde68a;
}

.badge-approved {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.badge-admin {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

/* --- Stats Cards --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
}

.stat-card .number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #a5b4fc;
}

.stat-card .label {
    font-size: 0.82rem;
    color: #8888aa;
    margin-top: 4px;
}

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

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

/* --- Profile Info Display --- */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.info-label {
    font-size: 0.82rem;
    color: #8888bb;
    margin-bottom: 2px;
}

.info-value {
    font-size: 0.95rem;
    color: #e0e0f0;
}

/* --- Dashboard --- */
.dashboard-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-nav a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #b0b0d0;
    transition: all 0.2s;
}
.dashboard-nav a:hover,
.dashboard-nav a.active {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
}

/* --- Site Footer --- */
.site-footer {
    text-align: center;
    padding: 30px 20px;
    color: #555577;
    font-size: 0.82rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 40px;
}
.site-footer a {
    color: #7777aa;
}
.site-footer a:hover {
    color: #a5b4fc;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(15, 12, 41, 0.95);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nav-links.active {
        display: flex;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .auth-box {
        margin: 30px 16px;
        padding: 28px 20px;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
