/* 
  Grace & Glory Admin Design System
  Theme: White & Gold with Subtle Dark Accents
*/

:root {
    --primary: #D4AF37;
    --primary-dark: #B8860B;
    --sidebar-bg: #1A1A1A;
    --sidebar-text: #FFFFFF;
    --main-bg: #F8F9FA;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-muted: #888888;
    --bg-light-gold: #FDF9EC;
    --border: #EEEEEE;
    --shadow: 0 5px 15px rgba(0,0,0,0.05);
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--main-bg);
}

h1, h2, h3, .logo {
    font-family: 'Playfair Display', serif;
}

.text-gold { color: var(--primary); }

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    font-size: 0.9rem;
}

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

.btn-gold:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-full { width: 100%; }

.btn-danger {
    background: #FF4D4D;
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-success {
    background: #28a745;
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Login Screen Styles */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F4EBD0 0%, #FFFFFF 100%);
}

.login-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header { margin-bottom: 2.5rem; }
.logo { font-size: 2rem; color: var(--primary); font-weight: 900; margin-bottom: 0.5rem; }
.logo span { color: var(--text-dark); }

.form-group { margin-bottom: 1.5rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
}

.error-msg {
    color: #FF4D4D;
    font-size: 0.8rem;
    margin-top: 1rem;
    display: none;
}

/* Admin Panel Layout */
.admin-panel {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    transition: 0.3s;
    z-index: 100;
}

.sidebar-header {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-toggle { cursor: pointer; display: none; font-size: 1.5rem; }

.sidebar-nav { flex-grow: 1; }
.sidebar-nav ul { list-style: none; }
.sidebar-nav li { margin-bottom: 0.5rem; }
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    text-decoration: none;
    color: #AAAAAA;
    transition: 0.3s;
}

.sidebar-nav .nav-link ion-icon { font-size: 1.3rem; }
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary);
    border-left: 4px solid var(--primary);
}

.logout-li { margin-top: auto; padding-bottom: 2rem; }

/* Main Content Area */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    z-index: 50;
}

.hamburger { cursor: pointer; font-size: 1.8rem; color: var(--primary); display: none; }

.admin-profile { display: flex; align-items: center; gap: 1rem; }
.admin-profile img { width: 40px; border-radius: 50%; }

.content-body { padding: 3rem; }

/* Sections */
.admin-section { display: none; }
.admin-section.active { display: block; animation: fadeIn 0.5s ease; }

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

/* Dashboard Stats */
.welcome-header { margin-bottom: 3rem; }
.welcome-header h1 { font-size: 2.2rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.icon-gold { background: #FFF9E6; color: var(--primary); }
.icon-blue { background: #E6F0FF; color: #007BFF; }
.icon-green { background: #E6FFF1; color: #28a745; }

.stat-info h3 { font-size: 1.8rem; line-height: 1; margin-bottom: 0.2rem; }
.stat-info p { color: var(--text-muted); font-size: 0.9rem; }

.activity-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

/* Tables */
.section-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.table-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

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

th { background-color: #FBFBFB; font-weight: 600; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; }
td { font-size: 0.9rem; }

tr:last-child td { border-bottom: none; }
tr:hover { background-color: #FAFAFA; }

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending { background: #FFF4E5; color: #FF9800; }
.badge-prayed { background: #E8F5E9; color: #4CAF50; }
.badge-private { background: #F5F5F5; color: #757575; }
.badge-public { background: #E3F2FD; color: #2196F3; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.close { cursor: pointer; font-size: 1.5rem; }

/* Responsive */
@media (max-width: 992px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100%;
    }
    .sidebar.active { left: 0; }
    .sidebar-toggle { display: block; }
    .hamburger { display: block; }
    .stats-grid { grid-template-columns: 1fr; }
    .content-body { padding: 1.5rem; }
    .table-container { overflow-x: auto; }
}
