/* vCrew Admin Panel Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Admin Container */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Authentication Styles */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.auth-box h2 {
    color: #e74c3c;
    margin-bottom: 1rem;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #2c3e50;
    color: white;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #34495e;
    background: #1a252f;
}

.sidebar-header h3 {
    color: #3498db;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.admin-info {
    background: rgba(52, 73, 94, 0.3);
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.admin-info small {
    color: #bdc3c7;
    line-height: 1.4;
}

.admin-info .role-badge {
    display: block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #3498db;
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    text-align: center;
    font-weight: 600;
}

/* Navigation Menu */
.nav-menu {
    list-style: none;
    padding: 0;
}

.nav-item {
    border-bottom: 1px solid #34495e;
}

.nav-item.active .nav-link {
    background: #3498db;
    color: white;
}

.nav-item.nav-separator {
    margin-top: 2rem;
    border-top: 2px solid #34495e;
    border-bottom: none;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: #34495e;
    color: #3498db;
}

.nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
    background: #f8f9fa;
    overflow-y: auto;
}

.content-header {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-header h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.timestamp {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

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

.stat-icon {
    background: #3498db;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.stat-content h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Dashboard Sections */
.dashboard-section {
    margin: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dashboard-section h2 {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    margin: 0;
    border-bottom: 1px solid #dee2e6;
    color: #2c3e50;
    border-radius: 8px 8px 0 0;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.quick-action:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-2px);
}

.quick-action i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

/* Activity List */
.activity-list {
    padding: 1.5rem;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: #f8f9fa;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item i {
    color: #3498db;
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

.activity-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-text {
    color: #2c3e50;
}

.activity-time {
    color: #6c757d;
    font-size: 0.85rem;
}

.no-activities {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

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

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

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

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

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

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

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

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.data-table tr:hover {
    background: #f8f9fa;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

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

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

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-info {
    background: #cce7f0;
    border: 1px solid #b8daff;
    color: #004085;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Responsive Design */
/* HTML Content Styling for Airfield Briefings */
.html-content {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

.content-preview, .content-full {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.content-preview ul, .content-full ul {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

.content-preview li, .content-full li {
    margin-bottom: 0.25rem;
}

.content-preview table, .content-full table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.85rem;
}

.content-preview th, .content-full th,
.content-preview td, .content-full td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: left;
}

.content-preview th, .content-full th {
    background-color: #f1f3f4;
    font-weight: bold;
}

.content-preview img, .content-full img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0.5rem 0;
}

.caution-content {
    margin-top: 0.5rem;
}

.caution-content strong {
    color: #d63384;
}

.section-caution {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 0.75rem;
    margin-top: 1rem;
    border-radius: 4px;
}

.section-caution i {
    margin-right: 0.5rem;
}

/* Badge styling */
.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-info {
    color: #fff;
    background-color: #17a2b8;
}

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

/* Minimal reusable modal component (deny-with-reason, NOTAM scope picker) — none existed
   before; the JS functions in admin.js targeting "#briefingModal" etc. are vestigial and
   target markup that no longer exists in airfield-briefings.php. */
.admin-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}
.admin-modal-box {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.admin-modal-box h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Section styling improvements */
.section-item {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 1rem;
    background: white;
}

.section-header {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-type {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.section-actions {
    display: flex;
    gap: 0.5rem;
}

.section-content {
    padding: 1rem;
}

/* Form text helper */
.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .content-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .dashboard-section {
        margin: 1rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .section-actions {
        justify-content: center;
    }
}