:root {
    --primary: #862c41;
    --secondary: #303556;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --light: #f8f9fa;
    --dark: #343a40;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

header {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo-text h1 {
    font-size: 1.8rem;
    margin: 0;
}

.logo-text p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin: 30px 0;
}

.card-header {
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    color: var(--secondary);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary);
}

input, textarea, select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s;
    text-decoration: none;
}

.btn:hover {
    background: #2980b9;
}

.btn-success {
    background: var(--success);
}

.btn-success:hover {
    background: #219653;
}

.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    position: relative;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
    border-top: 4px solid var(--primary);
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-card p {
    color: var(--secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: var(--secondary);
    color: white;
    font-weight: 500;
}

tr:hover {
    background-color: #f8f9fa;
}

.status-pending {
    background-color: #fef9e7;
    color: #b7950b;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.status-resolved {
    background-color: #eafaf1;
    color: #27ae60;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
}

footer {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: white;
}

.footer-section p, .footer-section li {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section a:hover {
    color: var(--warning);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .logo {
        justify-content: center;
    }
}
/* ======================
   ADMIN PANEL STYLES
   ====================== */

/* Admin Dashboard Layout */
.admin-dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

/* Admin Sidebar */
.admin-sidebar {
    background: var(--secondary);
    color: white;
    padding: 20px 0;
}

.admin-sidebar .logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-nav {
    margin-top: 20px;
}

.admin-nav ul {
    list-style: none;
}

.admin-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.admin-nav li a:hover,
.admin-nav li a.active {
    background-color: rgba(255,255,255,0.1);
}

.admin-nav li a i {
    width: 20px;
    text-align: center;
}

/* Admin Main Content */
.admin-main {
    padding: 20px;
    background: #f5f7fa;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    text-align: center;
    border-top: 4px solid var(--primary);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-card p {
    color: var(--dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Grievance Tables */
.grievance-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.grievance-table th {
    background: var(--secondary);
    color: white;
    padding: 12px 15px;
    text-align: left;
}

.grievance-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.grievance-table tr:last-child td {
    border-bottom: none;
}

.grievance-table tr:hover {
    background-color: #f8f9fa;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-in-progress {
    background-color: #cce5ff;
    color: #004085;
}

.status-resolved {
    background-color: #d4edda;
    color: #155724;
}

/* Admin Forms */
.admin-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary);
}

.admin-form .form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.admin-form textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Action Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-view {
    background-color: var(--primary);
    color: white;
}

.btn-view:hover {
    background-color: #2980b9;
}

.btn-edit {
    background-color: var(--warning);
    color: white;
}

.btn-edit:hover {
    background-color: #e67e22;
}

.btn-delete {
    background-color: var(--danger);
    color: white;
}

.btn-delete:hover {
    background-color: #c0392b;
}

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-dashboard {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        position: fixed;
        width: 100%;
        bottom: 0;
        z-index: 100;
        padding: 10px 0;
    }
    
    .admin-nav ul {
        display: flex;
        justify-content: space-around;
    }
    
    .admin-nav li a span {
        display: none;
    }
    
    .admin-main {
        padding-bottom: 70px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* Grievance Detail View */
.grievance-detail {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.grievance-detail .detail-group {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.grievance-detail .detail-label {
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 8px;
}

.grievance-detail .detail-value {
    font-size: 1.1rem;
}

/* Reply Form */
.reply-form {
    margin-top: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.reply-form .form-group {
    margin-bottom: 15px;
}

/* Alert Messages */
.alert-admin {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 10px;
}

.pagination .page-item {
    display: inline-block;
}

.pagination .page-link {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: var(--secondary);
}

.pagination .page-link:hover {
    background-color: #f8f9fa;
}

.pagination .active .page-link {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}
/* Add these styles */
.form-footer {
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}