:root {
    --primary-color: #0F172A;
    --accent-color: #7A232C;
    --accent-hover: #912b35;
    --bg-color: #F8FAFC;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(255, 255, 255, 0.5);
    --border-color: #E2E8F0;
    --border-radius-pill: 99px;
    --border-radius-card: 20px;
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.05);
    --shadow-hover: 0 20px 40px -10px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Background Glowing Orb Effect */
.background-orb {
    position: fixed;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(122,35,44,0.12) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

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

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Nav */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.brand-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

.main-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    background: #fff;
    padding: 8px 16px;
    border-radius: var(--border-radius-pill);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    color: var(--text-primary);
}

.main-phone svg {
    color: var(--accent-color);
}

/* Hero */
.hero-section {
    text-align: center;
    margin: 40px 0 30px;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #0F172A 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* Sticky Search Container with Glassmorphism */
.search-wrapper {
    position: sticky;
    top: 20px;
    z-index: 100;
    margin-bottom: 40px;
}

.search-box {
    position: relative;
    border-radius: 20px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.search-box:focus-within {
    box-shadow: var(--shadow-hover), 0 0 0 3px rgba(122,35,44,0.15);
    transform: translateY(-2px);
}

.search-input {
    width: 100%;
    padding: 20px 24px 20px 60px;
    font-size: 18px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
}

.search-input::placeholder {
    color: #94A3B8;
    font-weight: 400;
}

.search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    width: 22px;
    height: 22px;
}

.dept-link:hover {
    color: var(--primary-color) !important;
}

/* Directory List */
.results-section {
    flex: 1;
}

.results-container {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-soft);
    margin-bottom: 60px;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(10px);
    transition: background-color 0.2s ease;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item:hover {
    background-color: #F8FAFC;
}

.contact-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.contact-avatar {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.contact-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.contact-name {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-dept {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-email {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    margin-left: 15px;
}

.primary-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--accent-color);
    background: rgba(122,35,44,0.06);
    padding: 6px 12px;
    border-radius: 10px;
}

.secondary-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-secondary);
    background: #F1F5F9;
    padding: 6px 12px;
    border-radius: 10px;
    margin-top: 6px;
}

/* Modern Footer */
.modern-footer {
    background-color: #fff;
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--primary-color);
    text-align: center;
}

.footer-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.f-card {
    background: var(--bg-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
}

.f-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
    background: #fff;
}

.f-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: white;
}

.bg-blue { background: #3B82F6; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); }
.bg-orange { background: #F59E0B; box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3); }
.bg-green { background: #10B981; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); }
.bg-red { background: #EF4444; box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3); }

.f-icon svg { width: 24px; height: 24px; }

.f-content h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.f-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Utilities */
.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .footer-cards { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 36px; }
}
@media (max-width: 480px) {
    .footer-cards { grid-template-columns: 1fr; }
    .top-nav { flex-direction: column; gap: 15px; }
}

/* Admin Styles */
.admin-header {
    background-color: var(--accent-color);
    color: white;
    padding: 20px 0;
    margin-bottom: 40px;
}

.admin-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-header-inner h2 { font-family: 'Outfit', sans-serif; }

.admin-nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    opacity: 0.8;
}

.admin-nav a:hover {
    opacity: 1;
}

.admin-card {
    background: #fff;
    border-radius: var(--border-radius-card);
    padding: 30px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 30px;
}

.table-responsive {
    overflow-x: auto;
}

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

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--primary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(122,35,44,0.15);
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

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

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

.btn-danger {
    background-color: #EF4444;
    color: white;
}

.btn-danger:hover {
    background-color: #DC2626;
}

.btn-small {
    padding: 8px 15px;
    font-size: 14px;
}

.btn-block {
    display: block;
    width: 100%;
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-danger {
    background-color: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FCA5A5;
}

.alert-success {
    background-color: #F0FDF4;
    color: #16A34A;
    border: 1px solid #86EFAC;
}

/* Modals */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-content { background: #fff; margin: 5% auto; padding: 30px; border-radius: var(--border-radius-card); width: 90%; max-width: 600px; box-shadow: var(--shadow-hover); position: relative; }
.close-btn { position: absolute; right: 20px; top: 20px; font-size: 24px; cursor: pointer; color: #94A3B8; line-height: 1; }
.close-btn:hover { color: var(--text-primary); }

/* Login Page specific */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

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

.login-header h2 {
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.login-header p {
    color: var(--text-secondary);
}
