/**
 * =============================================================================
 * COMPLIANCE APP - MAIN STYLESHEET
 * =============================================================================
 * 
 * This file contains all common styles used throughout the application.
 * Organized into logical sections for easy maintenance.
 * 
 * Table of Contents:
 * 1. Reset & Base Styles
 * 2. Typography
 * 3. Layout Components
 * 4. Header & Navigation
 * 5. Forms & Inputs
 * 6. Buttons
 * 7. Cards & Containers
 * 8. Tables
 * 9. Badges & Labels
 * 10. Modals
 * 11. Alerts & Messages
 * 12. Task Components
 * 13. Stats & Metrics
 * 14. Utility Classes
 * 15. Responsive Design
 * 
 * =============================================================================
 */

/* =============================================================================
   1. RESET & BASE STYLES
   ============================================================================= */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, 
                 Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

/* =============================================================================
   2. TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #2d3748;
    line-height: 1.2;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.page-subtitle {
    color: #718096;
    margin-bottom: 30px;
    font-size: 16px;
}

.section-header {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #667eea;
    margin: 30px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

/* =============================================================================
   3. LAYOUT COMPONENTS
   ============================================================================= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.admin-card-icon i {
    font-size: 42px;
}

.admin-card-icon {
    color: #667eea;
}

.admin-sections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.admin-card {
    height: 100%;
}



.recent-activity {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recent-activity h2 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.activity-user {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.activity-action {
    font-size: 14px;
    color: #718096;
    margin-bottom: 5px;
}

.activity-time {
    font-size: 12px;
    color: #a0aec0;
}

/* =============================================================================
   4. HEADER & NAVIGATION
   ============================================================================= */

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

/* Navigation Tabs */
.nav-tabs {
    background: white;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav-tabs-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
}

.nav-tab {
    padding: 15px 25px;
    text-decoration: none;
    color: #6c757d;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: all 0.3s;
    cursor: pointer;
}

.nav-tab:hover {
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
}

.nav-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* =============================================================================
   5. FORMS & INPUTS
   ============================================================================= */

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

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

/* Checkbox and Radio */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"],
.checkbox-group input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}

/* =============================================================================
   6. BUTTONS
   ============================================================================= */

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    text-align: center;
}

.btn-primary {
    padding: 12px 24px;
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    padding: 10px 20px;
    background: #e2e8f0;
    color: #2d3748;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-danger {
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    font-size: 12px;
}

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

.btn-link {
    padding: 8px 20px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
}

.btn-link:hover {
    background: rgba(255,255,255,0.3);
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-login:active {
    transform: translateY(0);
}

/* =============================================================================
   7. CARDS & CONTAINERS
   ============================================================================= */

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.admin-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.admin-card:hover {
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-4px);
}

.admin-card-icon {
    font-size: 42px;
    margin-bottom: 15px;
}

.admin-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.admin-card p {
    color: #718096;
    font-size: 14px;
    line-height: 1.5;
}


/* =========================
   ADMIN CARD ENHANCEMENTS
   ========================= */

.admin-card {
    position: relative;
    overflow: hidden;
}

/* Icon base styling (merged) */
.admin-card-icon {
    font-size: 42px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Default icon color */
.admin-card-icon i {
    color: #667eea;
}

/* Hover effects */
.admin-card:hover .admin-card-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Card hover polish */
.admin-card:hover {
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.25);
}

/* Subtle gradient overlay on hover */
.admin-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.08));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-card:hover::after {
    opacity: 1;
}

.admin-card:hover {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.35);
}

/* Icon colour themes */
.icon-blue i { color: #3b82f6; }
.icon-green i { color: #10b981; }
.icon-purple i { color: #8b5cf6; }
.icon-orange i { color: #f59e0b; }
.icon-red i { color: #ef4444; }
.icon-teal i { color: #14b8a6; }
.icon-pink i { color: #ec4899; }
.icon-indigo i { color: #6366f1; }

/* =============================================================================
   8. TABLES
   ============================================================================= */

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

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

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

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

.table td {
    font-size: 14px;
    color: #4a5568;
}

/* =============================================================================
   9. BADGES & LABELS
   ============================================================================= */

.badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.badge-admin {
    background: #fef3c7;
    color: #92400e;
}

.badge-sysadmin {
    background: #fce7f3;
    color: #9f1239;
}

.badge-user {
    background: #dbeafe;
    color: #1e40af;
}

.task-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.task-badge.daily { 
    background: #dbeafe; 
    color: #1e40af; 
}

.task-badge.weekly { 
    background: #fce7f3; 
    color: #9f1239; 
}

.task-badge.biweekly { 
    background: #f3e8ff; 
    color: #6b21a8; 
}

.task-badge.monthly,
.task-badge.quarterly,
.task-badge.yearly { 
    background: #fef3c7; 
    color: #92400e; 
}

/* =============================================================================
   10. MODALS
   ============================================================================= */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2d3748;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* =============================================================================
   11. ALERTS & MESSAGES
   ============================================================================= */

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.alert-warning {
    background: #fff4e5;
    color: #cc7a00;
    border: 1px solid #ffe0b2;
}

.alert-info {
    background: #e3f2fd;
    color: #0277bd;
    border: 1px solid #bbdefb;
}

/* =============================================================================
   12. TASK COMPONENTS
   ============================================================================= */

.task-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    cursor: pointer;
}

.task-item:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
    transform: translateY(-2px);
}

.task-item.completed {
    background: #f0fdf4;
    border-color: #86efac;
}

.task-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

.task-content {
    flex: 1;
}

.task-name {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.task-meta {
    font-size: 14px;
    color: #718096;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.task-status {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    margin-left: 20px;
}

.task-status.complete {
    background: #22c55e;
    color: white;
}

.task-status.incomplete {
    background: #e2e8f0;
    color: #94a3b8;
    border: 2px dashed #cbd5e1;
}

.task-status.disabled {
    background: #f1f5f9;
    color: #cbd5e1;
}

/* Date Header */
.date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.date-title {
    font-size: 22px;
    font-weight: 600;
    color: #2d3748;
}

.date-nav {
    display: flex;
    gap: 10px;
}

.date-nav button {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.date-nav button:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.date-nav button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* =============================================================================
   13. STATS & METRICS
   ============================================================================= */

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

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.stat-card.white {
    background: white;
    color: #2d3748;
    border-left: 4px solid #667eea;
}

.stat-card h3 {
    font-size: 14px;
    color: inherit;
    opacity: 0.9;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    opacity: 0.9;
    text-transform: uppercase;
}

/* =============================================================================
   14. UTILITY CLASSES
   ============================================================================= */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

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

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

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

/* =============================================================================
   15. RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
    /* Header */
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-info {
        flex-direction: column;
        width: 100%;
    }
    
    /* Navigation */
    .nav-tab {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    /* Forms */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    /* Tasks */
    .task-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .task-status {
        margin-left: 0;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .task-name {
        font-size: 16px;
    }
    
    /* Tables */
    .table {
        font-size: 13px;
    }
    
    .table th,
    .table td {
        padding: 10px;
    }
    
    /* Page Header */
    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    /* Modal */
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .modal-header {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 15px;
    }
}

/* =============================================================================
   END OF STYLESHEET
   ============================================================================= */


