/* assets/css/admin.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #800020;        /* Maroon */
    --secondary: #D4AF37;      /* Gold */
    --dark: #1C1A1A;
    --light: #F4F6F9;          /* Light gray background for dashboard */
    --white: #FFFFFF;
    --sidebar-width: 260px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    --success: #2ecc71;
    --warning: #f1c40f;
    --danger: #e74c3c;
    --info: #3498db;
    --text-color: #2c3e50;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Styling */
.admin-sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary);
    color: var(--white);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.sidebar-header h2 {
    font-size: 1.15rem;
    color: var(--white);
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-header span {
    font-size: 0.75rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-menu li {
    margin-bottom: 0.3rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.sidebar-menu a:hover, .sidebar-menu li.active a {
    color: var(--white);
    background-color: rgba(255,255,255,0.06);
    border-left-color: var(--secondary);
}

.sidebar-menu a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-footer a:hover {
    color: var(--secondary);
}

/* Main Dashboard Panel */
.admin-main {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 2.5rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.admin-title h1 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.admin-title p {
    color: #64748b;
    font-size: 0.95rem;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
}

.admin-user i {
    font-size: 1.2rem;
    color: var(--primary);
    background-color: rgba(128, 0, 32, 0.08);
    padding: 0.6rem;
    border-radius: 50%;
}

/* Card Widgets */
.admin-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.widget-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.widget-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
}

.widget-info h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.widget-info p {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.widget-icon {
    font-size: 1.8rem;
    color: var(--primary);
    background-color: rgba(128,0,32,0.05);
    padding: 0.8rem;
    border-radius: 10px;
    height: 50px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content Sections */
.admin-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    overflow: hidden;
}

.admin-card-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card-header h2 {
    font-size: 1.2rem;
    color: var(--primary);
}

.admin-card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: var(--transition);
}

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

.btn-admin-primary:hover {
    background-color: #600018;
}

.btn-admin-secondary {
    background-color: var(--secondary);
    color: var(--dark);
}

.btn-admin-secondary:hover {
    background-color: #c29b30;
}

.btn-admin-danger {
    background-color: var(--danger);
    color: var(--white);
}

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

.btn-admin-success {
    background-color: var(--success);
    color: var(--white);
}

.btn-admin-success:hover {
    background-color: #27ae60;
}

/* Tables in Admin */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

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

.admin-table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.admin-table td {
    font-size: 0.95rem;
    font-weight: 500;
}

.admin-table tbody tr:hover {
    background-color: #f8fafc;
}

.action-links {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 4px;
    font-weight: 600;
    color: var(--white);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.action-btn.edit {
    background-color: var(--info);
}

.action-btn.delete {
    background-color: var(--danger);
}

/* Forms in Admin */
.admin-form .form-group {
    margin-bottom: 1.5rem;
}

.admin-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.admin-form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
}

.admin-form .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* Alerts */
.admin-alert {
    padding: 0.9rem 1.2rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.admin-alert-success {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.admin-alert-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Login Screen Layout */
.login-body {
    background: linear-gradient(rgba(128,0,32,0.85), rgba(28,26,26,0.9)), url('../images/hero.png');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

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

.login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 1.5rem;
}

.login-card h2 {
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.login-form {
    text-align: left;
}

/* Gallery Admin Styles */
.admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.admin-gallery-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.admin-gallery-thumb {
    height: 150px;
    overflow: hidden;
    position: relative;
}

.admin-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-gallery-info {
    padding: 1rem;
}

.admin-gallery-info p {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Image preview for uploads */
.image-preview {
    width: 100%;
    max-width: 200px;
    height: 150px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f8fafc;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Admin */
@media (max-width: 1024px) {
    .admin-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    .sidebar-menu {
        display: none; /* In a real mobile view we would toggle this */
    }
    .admin-main {
        margin-left: 0;
        padding: 1.5rem;
    }
    .admin-widgets {
        grid-template-columns: 1fr;
    }
}
