/* static/css/custom.css - Custom styles for Makau DMS */

/* Global Styles */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #f72d2d;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-muted: #6b7280;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #374151;
}

/* Card Enhancements */
.card {
    border: none;
    box-shadow: var(--shadow);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px 12px 0 0 !important;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: transparent;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* Navigation Enhancements */
.navbar {
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0 2px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Form Enhancements */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: #f3f5f8;
    margin-bottom: 0.5rem;
}

/* Table Enhancements */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    border-top: none;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: #b6bcc4;
    padding: 1rem;
    background-color: #f8fafc;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8fafc;
    transform: scale(1.005);
}

.table tbody td {
    padding: 1rem;
    border-color: #f1f5f9;
    vertical-align: middle;
}

/* Badge Enhancements */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* Alert Enhancements */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background-color: #f0f9ff;
    color: #0c4a6e;
    border-left: 4px solid var(--info-color);
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Document Status Indicators */
.document-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.document-status.locked {
    background-color: #fee2e2;
    color: #991b1b;
}

.document-status.public {
    background-color: #dcfce7;
    color: #166534;
}

.document-status.viewing {
    background-color: #fef3c7;
    color: #92400e;
}

/* File Type Icons */
.file-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
}

.file-icon.pdf { background-color: #ef4444; }
.file-icon.doc { background-color: #2563eb; }
.file-icon.docx { background-color: #2563eb; }
.file-icon.xls { background-color: #10b981; }
.file-icon.xlsx { background-color: #10b981; }
.file-icon.ppt { background-color: #f59e0b; }
.file-icon.pptx { background-color: #f59e0b; }
.file-icon.jpg { background-color: #8b5cf6; }
.file-icon.jpeg { background-color: #8b5cf6; }
.file-icon.png { background-color: #8b5cf6; }
.file-icon.gif { background-color: #8b5cf6; }
.file-icon.txt { background-color: #6b7280; }
.file-icon.default { background-color: #6b7280; }

/* Dropdown Menu Enhancements */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
    color: #374151;
    transform: translateX(2px);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-top: 1px solid #e5e7eb;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #f1f5f9;
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 4px;
}

/* Dashboard Specific Styles */
.dashboard-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.1);
}

.form-text {
    color: #eaeef7;  /* Change to your preferred color */
    font-size: 0.875rem;
    font-style: italic;  /* Optional */
}

/* Or target specifically the reminder help text */
#div_id_reminder_minutes_before .form-text {
    color: #f3f4f7;
}

.stat-card {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #c9e3e7;
    line-height: 1;
}

.stat-label {
    color: #cee4e7;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .table-responsive {
        border-radius: 8px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f3f4f6;
        --bg-color: #1f2937;
        --card-bg: #374151;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .card {
        background-color: var(--card-bg);
    }
    
    .table thead th {
        background-color: #4b5563;
        color: var(--text-color);
    }
    
    .table tbody tr:hover {
        background-color: #4b5563;
    }
}

.card-body h4 {
    color: #ebf3f0;  /* ADD THIS */
    font-weight: 700;
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease forwards;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) border-box;
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .dropdown,
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}