/* Admin Panel Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Arapey:ital@0;1&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

@font-face {
    font-family: 'Lovelo';
    src: url('../fonts/lovelo_black-webfont.woff2') format('woff2'),
         url('../fonts/lovelo_black-webfont.woff') format('woff'),
         url('../fonts/lovelo_black-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-dark: #440a19;
    --primary-light: #ebe7df;
    --accent-gold: #b39268;
    --text-dark: #2c2523;
    --text-light: #ebe7df;
    --white: #ffffff;
    --bg-gray: #fcfbf9;
    --border-color: rgba(68, 10, 25, 0.1);
    --shadow-sm: 0 2px 10px rgba(68, 10, 25, 0.05);
    --shadow-md: 0 5px 20px rgba(68, 10, 25, 0.08);
    --transition-smooth: all 0.3s ease;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Montserrat', Helvetica, sans-serif;
}

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

body {
    background-color: var(--primary-light);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: var(--font-body);
}

/* Auth Login Page */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background-color: var(--primary-dark);
}

.login-card {
    background-color: var(--white);
    width: 100%;
    max-width: 420px;
    padding: 45px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--accent-gold);
    text-align: center;
}

.login-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: 4px;
    margin-bottom: 5px;
}

.login-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-gold);
    margin-bottom: 35px;
    font-weight: 600;
}

.login-error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
    padding: 12px;
    margin-bottom: 25px;
    font-size: 0.85rem;
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 25px;
    text-align: left;
}

.login-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(68, 10, 25, 0.15);
    background-color: var(--bg-gray);
    font-size: 0.9rem;
    font-family: var(--font-body);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-dark);
}

.btn-admin-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-dark);
    color: var(--white);
    border: 1px solid var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 10px;
}

.btn-admin-submit:hover {
    background-color: transparent;
    color: var(--primary-dark);
}

/* Sidebar Layout */
.sidebar {
    width: 260px;
    background-color: var(--primary-dark);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 30px 24px;
    border-bottom: 1px solid rgba(235, 231, 223, 0.1);
}

.sidebar-title {
    font-family: 'Lovelo', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 3px;
    color: var(--primary-light);
}

.sidebar-subtitle {
    font-family: 'Arapey', serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-gold);
    margin-top: 3px;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 30px 0;
    flex-grow: 1;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(235, 231, 223, 0.7);
    transition: var(--transition-smooth);
    border-left: 3px solid transparent;
}

.sidebar-menu-item a i {
    width: 25px;
    font-size: 1rem;
    margin-right: 10px;
}

.sidebar-menu-item.active a, .sidebar-menu-item a:hover {
    color: var(--primary-light);
    background-color: rgba(235, 231, 223, 0.05);
    border-left-color: var(--accent-gold);
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(235, 231, 223, 0.1);
    font-size: 0.8rem;
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    color: rgba(235, 231, 223, 0.6);
    transition: var(--transition-smooth);
}

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

.sidebar-footer a i {
    margin-right: 8px;
}

/* Main Content Area */
.main-wrapper {
    margin-left: 260px;
    flex-grow: 1;
    padding: 40px;
    background-color: #fcfaf7;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--primary-dark);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--primary-dark);
}

.user-avatar {
    width: 35px;
    height: 35px;
    background-color: var(--primary-dark);
    color: var(--primary-light);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 0.9rem;
    border: 1px solid var(--accent-gold);
}

/* Dashboard Cards Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: var(--white);
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.stat-info h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #777777;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}

.stat-icon {
    font-size: 2.5rem;
    color: rgba(68, 10, 25, 0.15);
}

/* Recent Actions Split */
.dashboard-split {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
}

.panel {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

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

.panel-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--primary-dark);
}

/* Tables styling */
.custom-table-container {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    padding: 14px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #777777;
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
}

.custom-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.custom-table tbody tr:hover {
    background-color: #faf9f6;
}

/* Buttons inside CMS */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: var(--primary-dark);
    color: var(--white);
    border: 1px solid var(--primary-dark);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-action:hover {
    background-color: transparent;
    color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.btn-danger {
    background-color: #c92a2a;
    border-color: #c92a2a;
}

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

.action-links {
    display: flex;
    gap: 10px;
}

.action-btn-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    color: var(--white);
    transition: var(--transition-smooth);
}

.action-btn-icon.edit {
    background-color: var(--accent-gold);
}

.action-btn-icon.edit:hover {
    background-color: #9d7b53;
}

.action-btn-icon.delete {
    background-color: #dc3545;
}

.action-btn-icon.delete:hover {
    background-color: #bd2130;
}

.action-btn-icon.view {
    background-color: #17a2b8;
}

.action-btn-icon.view:hover {
    background-color: #117a8b;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
}

.badge.unread {
    background-color: rgba(68, 10, 25, 0.1);
    color: var(--primary-dark);
}

.badge.read {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

/* Forms styling */
.admin-form-panel {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    max-width: 750px;
}

.admin-form .form-group {
    margin-bottom: 25px;
}

.admin-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(68, 10, 25, 0.15);
    background-color: var(--bg-gray);
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: var(--transition-smooth);
}

.admin-form input[type="text"]:focus,
.admin-form input[type="email"]:focus,
.admin-form input[type="password"]:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(68, 10, 25, 0.05);
}

.admin-form textarea {
    height: 130px;
    resize: vertical;
}

.admin-form input[type="file"] {
    display: block;
    margin-top: 5px;
}

.file-preview {
    margin-top: 15px;
    max-width: 200px;
    border: 1px solid var(--border-color);
    padding: 5px;
    background-color: var(--bg-gray);
}

.file-preview img {
    width: 100%;
    height: auto;
    display: block;
}

/* Settings Sections */
.settings-section-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--primary-dark);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Modal form style (for fast pop-up creation/edit) */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 37, 35, 0.6);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.admin-modal.active {
    opacity: 1;
    pointer-events: all;
}

.admin-modal-content {
    background-color: var(--white);
    width: 90%;
    max-width: 550px;
    padding: 35px;
    border: 1px solid var(--accent-gold);
    box-shadow: var(--shadow-md);
    position: relative;
}

.admin-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-dark);
    transition: var(--transition-smooth);
}

.admin-modal-close:hover {
    color: var(--accent-gold);
}

/* Responsive sidebar */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar-header {
        padding: 20px 10px;
        text-align: center;
    }
    
    .sidebar-title, .sidebar-subtitle {
        display: none;
    }
    
    .sidebar-menu-item a {
        padding: 15px;
        justify-content: center;
    }
    
    .sidebar-menu-item a i {
        margin-right: 0;
    }
    
    .sidebar-menu-item a span {
        display: none;
    }
    
    .sidebar-footer a {
        justify-content: center;
        padding: 15px 0;
    }
    
    .sidebar-footer a span {
        display: none;
    }
    
    .main-wrapper {
        margin-left: 70px;
        padding: 30px;
    }
    
    .dashboard-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .sidebar-menu {
        display: flex;
        padding: 0;
        justify-content: space-around;
    }
    
    .sidebar-menu-item a {
        padding: 15px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .sidebar-menu-item.active a, .sidebar-menu-item a:hover {
        border-left-color: transparent;
        border-bottom-color: var(--accent-gold);
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .main-wrapper {
        margin-left: 0;
        padding: 20px;
    }
}
