/* ================================================================
   Gayathri Enterprises — Dashboard & Admin CSS
   ================================================================ */

.dashboard-body {
    background: var(--bg-2);
    min-height: 100vh;
}

/* Header */
.dash-header {
    background: rgba(6, 10, 20, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-header { border-left: 3px solid var(--pink); }
.dash-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dash-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-family: var(--font-head);
    color: var(--text);
    font-size: 0.95rem;
    text-decoration: none;
}
.dash-logo:hover { color: var(--accent-2); }
.dash-nav { display: flex; gap: 4px; align-items: center; }
.dash-nav a {
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-2);
    border-radius: 8px;
    text-decoration: none;
    transition: all var(--transition);
}
.dash-nav a:hover { color: var(--text); background: var(--surface-2); }
.dash-nav a.active { color: var(--accent-2); background: var(--surface-3); }
.dash-nav a.dash-logout { color: var(--red); }
.dash-nav a.dash-logout:hover { background: rgba(248,113,113,0.15); }

/* Main */
.dash-main { padding: 40px 0 80px; }
.dash-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 28px; }
.dash-welcome { margin-bottom: 32px; }
.dash-welcome h1 { font-size: 2rem; margin-bottom: 6px; }
.dash-welcome p { color: var(--text-2); font-size: 1.05rem; }

/* Cards */
.dash-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.dash-card-icon { font-size: 2rem; }
.dash-card-value { font-size: 1.6rem; font-weight: 700; font-family: var(--font-head); color: var(--text); }
.dash-card-label { font-size: 0.82rem; color: var(--text-2); margin-top: 2px; }

/* Grid */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 768px) { .dash-grid { grid-template-columns: 1fr; } }

/* Panels */
.dash-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}
.dash-panel h3 { margin-bottom: 16px; font-size: 1.1rem; }

/* Forms */
.dash-form { display: flex; flex-direction: column; gap: 12px; }
.dash-form input, .dash-form select, .dash-form textarea {
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    width: 100%;
    box-sizing: border-box;
}
.dash-form input:focus, .dash-form select:focus, .dash-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.dash-form select { cursor: pointer; }
.dash-form select option { background: var(--bg-3); color: var(--text); }
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; }

/* Tables */
.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.dash-table th {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-2);
    font-weight: 600;
    color: var(--text-2);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.dash-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.dash-table tr:hover td { background: var(--surface-2); }

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.status-active { background: rgba(74,222,128,0.15); color: var(--green); }
.status-inactive { background: rgba(248,113,113,0.15); color: var(--red); }
.status-suspended { background: rgba(251,191,36,0.15); color: var(--yellow); }
.status-sent { background: rgba(74,222,128,0.12); color: var(--green); }
.status-failed { background: rgba(248,113,113,0.12); color: var(--red); }
.status-queued { background: rgba(99,102,241,0.12); color: var(--blue); }
.status-delivered { background: rgba(34,211,238,0.12); color: var(--cyan); }
.status-rejected { background: rgba(248,113,113,0.12); color: var(--red); }

/* Activity rows */
.recent-activity { display: flex; flex-direction: column; gap: 8px; }
.activity-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 10px;
    background: var(--surface-2);
    border-radius: 8px;
    font-size: 0.84rem;
}
.activity-row span { flex: 0 0 auto; }
.act-status { text-transform: uppercase; font-weight: 600; font-size: 0.72rem; }
.act-msg { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 !important; }
.act-time { color: var(--text-3); font-size: 0.75rem; font-family: var(--font-mono); }
.text-muted { color: var(--text-3); }

/* SMS result */
.sms-result { padding: 12px; border-radius: 8px; font-weight: 500; }
.sms-success { background: rgba(74,222,128,0.1); color: var(--green); }
.sms-error { background: rgba(248,113,113,0.1); color: var(--red); }

/* WhatsApp float button */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}
.whatsapp-float svg { width: 28px; height: 28px; fill: #fff; }

/* Auth modals on homepage */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal-box {
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 36px;
    width: 440px;
    max-width: 95vw;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.25s ease;
}
.modal-box h2 { margin-bottom: 20px; text-align: center; }
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-2);
    font-size: 1.4rem;
    cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.modal-links { text-align: center; margin-top: 14px; font-size: 0.88rem; color: var(--text-2); }
.modal-links a { color: var(--accent-2); cursor: pointer; font-weight: 500; }
.modal-links a:hover { text-decoration: underline; }

@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
@keyframes slideUp { from { transform:translateY(20px); opacity:0 } to { transform:translateY(0); opacity:1 } }

/* Auth buttons in nav */
nav a.btn-login {
    padding: 8px 16px;
    font-weight: 600;
    color: var(--accent-2);
    border: 1px solid var(--accent-2);
    border-radius: 8px;
    margin-left: 4px;
}
nav a.btn-login:hover { background: var(--accent-glow); color: var(--accent-2); }
nav a.btn-register {
    padding: 8px 16px;
    font-weight: 600;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    margin-left: 4px;
}
nav a.btn-register:hover { background: var(--accent-3); color: #fff; }
