/**
 * BerezaWP Admin - Stylesheet
 * Mobile-first responsive design
 */

:root {
    --navy: #1E3A5F;
    --teal: #5DADE2;
    --orange: #E67E22;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --dark-gray: #333333;
    --success: #27AE60;
    --danger: #E74C3C;
    --warning: #F39C12;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--navy) 0%, #2C5282 100%);
}

.login-container {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 24px;
    color: var(--navy);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-gray);
}

.login-form label i {
    margin-right: 8px;
    color: var(--teal);
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--teal);
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.login-footer a {
    color: var(--navy);
    text-decoration: none;
}

.login-footer a:hover {
    color: var(--teal);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--orange), #D35400);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(230, 126, 34, 0.4);
}

.btn-secondary {
    background: var(--teal);
    color: var(--white);
}

.btn-secondary:hover {
    background: #4AA3D5;
}

.btn-full {
    width: 100%;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.3s;
}

.alert-error {
    background: #FDEDEE;
    color: var(--danger);
    border: 1px solid #FECACA;
}

.alert-success {
    background: #E8F8F0;
    color: var(--success);
    border: 1px solid #A7F3D0;
}

/* Admin Layout */
.admin-page {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--navy);
    color: var(--white);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.admin-sidebar.active {
    transform: translateX(0);
}

@media (min-width: 768px) {
    .admin-sidebar {
        transform: translateX(0);
    }
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo img {
    width: 40px;
    height: 40px;
}

.sidebar-logo span {
    font-size: 20px;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-left: 3px solid var(--teal);
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
}

.nav-section {
    padding: 20px 20px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 8px 0;
    font-size: 14px;
}

.sidebar-footer a:hover {
    color: var(--white);
}

.admin-main {
    flex: 1;
    margin-left: 0;
    padding: 20px;
    padding-bottom: 80px;
}

@media (min-width: 768px) {
    .admin-main {
        margin-left: 250px;
    }
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header h1 {
    color: var(--navy);
    font-size: 24px;
}

.admin-user {
    font-size: 14px;
    color: #666;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
}

.stat-content h3 {
    font-size: 28px;
    color: var(--navy);
    margin-bottom: 5px;
}

.stat-content p {
    font-size: 14px;
    color: #666;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #E5E7EB;
}

.card-header h2 {
    font-size: 16px;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i {
    color: var(--teal);
}

.card-body {
    padding: 20px;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.data-table th {
    font-weight: 600;
    color: var(--navy);
    background: var(--light-gray);
}

.data-table tr:hover {
    background: var(--light-gray);
}

.data-table tr.unread {
    background: #FEF3C7;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #D1FAE5;
    color: var(--success);
}

.badge-warning {
    background: #FEF3C7;
    color: var(--warning);
}

.badge-danger {
    background: #FECACA;
    color: var(--danger);
}

/* Quick Actions */
.quick-actions .action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 10px;
    text-decoration: none;
    color: var(--navy);
    transition: all 0.3s;
}

.action-item:hover {
    background: var(--navy);
    color: var(--white);
}

.action-item i {
    font-size: 24px;
    color: var(--teal);
}

.action-item:hover i {
    color: var(--white);
}

.action-item span {
    font-size: 14px;
    font-weight: 500;
}

/* No Data */
.no-data {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* Footer Credit */
.admin-footer-credit {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    text-align: center;
    background: var(--white);
    font-size: 13px;
    color: #666;
    border-top: 1px solid #E5E7EB;
    z-index: 999;
}

.admin-footer-credit a {
    color: var(--navy);
    text-decoration: none;
}

.admin-footer-credit a:hover {
    color: var(--teal);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-form input,
.filter-form select {
    padding: 10px 15px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
}

.filter-form input:focus,
.filter-form select:focus {
    outline: none;
    border-color: var(--teal);
}

/* Action Buttons */
.actions {
    white-space: nowrap;
}

.actions .btn {
    margin-right: 5px;
}

.actions .btn:last-child {
    margin-right: 0;
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #219A52;
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-warning:hover {
    background: #D68910;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #C0392B;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Responsive */
@media (max-width: 767px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-form {
        flex-wrap: wrap;
    }

    .filter-form input,
    .filter-form select {
        flex: 1;
        min-width: 120px;
    }
}
