/**
 * Editor AI UWAIS - Custom Styles
 * Author: Penerbit Uwais
 */

/* Root Variables */
:root {
    --uwais-primary: #1e3a8a;
    --uwais-secondary: #3b82f6;
    --uwais-gold: #fbbf24;
    --uwais-success: #10b981;
    --uwais-danger: #ef4444;
    --uwais-warning: #f59e0b;
    --uwais-info: #06b6d4;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    background: #f8fafc;
    color: #1e293b;
}

/* Custom Buttons */
.btn-primary {
    background: var(--uwais-primary);
    border-color: var(--uwais-primary);
}

.btn-primary:hover {
    background: #1e40af;
    border-color: #1e40af;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

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

/* Progress Bars */
.progress {
    border-radius: 10px;
    background: #e2e8f0;
}

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

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
}

/* Tables */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    background: #f1f5f9;
    border: none;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table-hover tbody tr:hover {
    background: #f8fafc;
}

/* Forms */
.form-label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.625rem 0.875rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--uwais-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Input Groups */
.input-group-text {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px 0 0 8px;
    color: #64748b;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.25rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.flash-messages .alert {
    animation: slideIn 0.3s ease-out;
}

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

/* Modals */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 12px 12px 0 0;
}

/* Spinners */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card {
        padding: 1rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .flash-messages {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .topbar,
    .btn,
    .flash-messages {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Tooltips */
.tooltip {
    font-size: 0.875rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Status Indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot.active {
    background: var(--uwais-success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-dot.inactive {
    background: #94a3b8;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #1e293b;
    font-weight: 600;
}

.text-muted {
    color: #64748b !important;
}

/* Links */
a {
    color: var(--uwais-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--uwais-secondary);
}

/* Code */
code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.875em;
}

/* Utility Classes */
.shadow-sm {
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.shadow {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.shadow-lg {
    box-shadow: 0 10px 15px rgba(0,0,0,0.1) !important;
}

.rounded-lg {
    border-radius: 12px !important;
}

.rounded-xl {
    border-radius: 16px !important;
}
