/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --border: rgba(255, 255, 255, 0.1);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: radial-gradient(circle at top right, #1e3a8a, transparent 40%),
        radial-gradient(circle at bottom left, #064e3b, transparent 40%);
}

.glassmorphism {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

/* Typography */
h1,
h2,
h3 {
    color: var(--text-main);
}

.hidden {
    display: none !important;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.9);
    z-index: 100;
    transition: opacity 0.5s ease;
}

.login-overlay:not(.active) {
    opacity: 0;
    pointer-events: none;
}

.login-card {
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    object-fit: cover;
    border: 2px solid var(--primary);
}

#login-form input {
    width: 100%;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

#login-form input:focus {
    border-color: var(--primary);
}

.btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.error-message {
    color: #ef4444;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.8);
    border-right: var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.sidebar-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.nav-item.active {
    background: var(--primary);
}

.nav-item.return-site {
    margin-top: auto;
    color: #94a3b8;
}

.nav-item.return-site:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.logout-btn {
    margin-top: 1rem;
    padding: 1rem;
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #ef4444;
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.stat-badge {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tables & Cards */
.table-container {
    overflow-x: auto;
    padding: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.message-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s;
}

.message-card:hover {
    transform: translateY(-5px);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.message-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.message-email {
    font-size: 0.85rem;
    color: var(--primary);
}

.message-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.message-body {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #e2e8f0;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
}

.section-pane {
    display: none;
}

.section-pane.active {
    display: block;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}