/* Admin Panel Styles */
/* Theme Variables */
:root {
    --primary-color: #0057b8; /* Deep blue */
    --secondary-color: #00c6ae; /* Teal */
    --bg-light: #f5f6fa;
    --text-dark: #222;
    --text-light: #666;
    --border-color: #e0e0e0;
}

.admin-body {
    display: flex;
    min-height: 100vh;
    background: #f5f6fa;
}

/* Admin Login Page */
.admin-login-page {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.admin-login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.admin-login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.admin-login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.admin-login-logo img {
    width: 120px;
    height: auto;
}

.admin-login-box h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

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

.admin-login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.admin-login-form .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

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

.btn-block {
    width: 100%;
}

.admin-login-footer {
    margin-top: 20px;
    text-align: center;
}

.admin-login-footer a {
    color: var(--text-light);
    text-decoration: none;
}

.admin-login-footer a:hover {
    color: var(--primary-color);
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--primary-color);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-logo img {
    width: 80px;
    height: auto;
    margin-bottom: 10px;
}

.admin-logo h3 {
    font-size: 1.2rem;
    margin: 0;
}

.admin-nav {
    padding: 20px 0;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: rgba(255,255,255,0.1);
}

.admin-nav-item i {
    font-size: 1.2rem;
}

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

.admin-sidebar-footer a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Main Content */
.admin-main-content {
    margin-left: 260px;
    flex: 1;
    padding: 0;
}

.admin-header {
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    margin: 0;
    color: var(--primary-color);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-content {
    padding: 40px;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    cursor: pointer;
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-color);
}

.stat-info h3 {
    font-size: 2.5rem;
    margin: 0 0 5px 0;
    color: var(--primary-color);
}

.stat-info p {
    margin: 0;
    color: var(--text-light);
}

/* Dashboard Welcome */
.dashboard-welcome {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.dashboard-welcome h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Tables */
.admin-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

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

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
}

.admin-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.admin-table tr:nth-child(even) {
    background: var(--bg-light);
}

.admin-table img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

/* Forms */
.admin-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

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

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Buttons */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-new {
    background: #28a745;
    color: white;
}

.badge-read {
    background: #ffc107;
    color: #212529;
}

.badge-responded {
    background: #6c757d;
    color: white;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.admin-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.admin-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.admin-card-content {
    padding: 20px;
}

.admin-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.admin-card-actions {
    padding: 15px 20px;
    background: var(--bg-light);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 200px;
    }
    
    .admin-main-content {
        margin-left: 200px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .admin-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .admin-main-content {
        margin-left: 0;
    }
    
    .admin-content {
        padding: 20px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-content form {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #ddd;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.card-header {
    padding: 20px 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.card-body {
    padding: 30px;
}

/* Button Icon Styles */
.btn-icon {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.btn-icon:hover {
    color: var(--secondary-color);
}

.btn-icon-danger {
    color: #dc3545;
}

.btn-icon-danger:hover {
    color: #c82333;
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
}

.text-center {
    text-align: center;
}

/* Form Text */
.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.875rem;
    color: #6c757d;
}
