/**
 * Custom CSS untuk Sistem Absensi Guru - Premium Design
 * File: assets/css/style.css
 */

/* Custom Variables - Premium Theme */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #4facfe;
    --warning-color: #f6d365;
    --danger-color: #ff6b6b;
    --info-color: #4facfe;
    --light-color: #f8f9ff;
    --dark-color: #2c3e50;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warning: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --gradient-danger: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    --gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    --shadow-light: 0 8px 32px rgba(31, 38, 135, 0.37);
    --shadow-medium: 0 15px 35px rgba(31, 38, 135, 0.2);
    --shadow-heavy: 0 25px 50px rgba(31, 38, 135, 0.15);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
    --border-radius: 20px;
    --border-radius-small: 12px;
    --border-radius-large: 30px;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.2s ease;
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
}

/* Global Styles - Premium */
body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.6;
    color: #2c3e50;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-20px) translateY(-10px); }
    50% { transform: translateX(20px) translateY(10px); }
    75% { transform: translateX(-10px) translateY(20px); }
}

/* Custom Scrollbar - Premium */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-accent);
    box-shadow: var(--shadow-glow);
}

/* Glass Morphism Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-heavy);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.card:hover .card-header::before {
    left: 100%;
}

.card-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Premium Buttons */
.btn {
    border-radius: var(--border-radius-small);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.875rem 2rem;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(79, 172, 254, 0.4);
    color: white;
}

.btn-warning {
    background: var(--gradient-warning);
    color: white;
    box-shadow: 0 8px 25px rgba(246, 211, 101, 0.3);
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(246, 211, 101, 0.4);
    color: white;
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    backdrop-filter: blur(10px);
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Premium Form Controls */
.form-control {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-small);
    padding: 1rem 1.25rem;
    transition: var(--transition);
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25), 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.form-select {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-small);
    padding: 1rem 1.25rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-select:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25), 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Premium Tables */
.table {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: var(--shadow-light);
}

.table thead th {
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-weight: 700;
    padding: 1.25rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table tbody td {
    padding: 1.25rem;
    vertical-align: middle;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.5);
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.01);
}

.table tbody tr:hover td {
    background: rgba(102, 126, 234, 0.1);
}

/* Premium Badges */
.badge {
    border-radius: 25px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: var(--transition-fast);
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.badge.bg-success {
    background: var(--gradient-success) !important;
    color: white;
}

.badge.bg-warning {
    background: var(--gradient-warning) !important;
    color: white;
}

.badge.bg-danger {
    background: var(--gradient-danger) !important;
    color: white;
}

.badge.bg-primary {
    background: var(--gradient-primary) !important;
    color: white;
}

.badge.bg-info {
    background: var(--gradient-info) !important;
    color: white;
}

/* Premium Alerts */
.alert {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-small);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
}

.alert-success {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1), rgba(0, 242, 254, 0.05));
}

.alert-success::before {
    background: var(--gradient-success);
}

.alert-danger {
    border-left-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(238, 90, 82, 0.05));
}

.alert-danger::before {
    background: var(--gradient-danger);
}

.alert-warning {
    border-left-color: var(--warning-color);
    background: linear-gradient(135deg, rgba(246, 211, 101, 0.1), rgba(253, 160, 133, 0.05));
}

.alert-warning::before {
    background: var(--gradient-warning);
}

.alert-info {
    border-left-color: var(--info-color);
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1), rgba(0, 242, 254, 0.05));
}

.alert-info::before {
    background: var(--gradient-info);
}

/* Premium Modals */
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius-large) var(--border-radius-large) 0 0;
    border: none;
    padding: 1.5rem 2rem;
    position: relative;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
    transition: var(--transition-fast);
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.5);
}

.modal-footer {
    background: rgba(248, 249, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem 2rem;
}

/* Premium Sidebar */
.sidebar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 100vh;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.9);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-small);
    margin: 0.25rem 1rem;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.15);
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.sidebar .nav-link:hover::before,
.sidebar .nav-link.active::before {
    left: 100%;
}

.sidebar .nav-link i {
    width: 24px;
    margin-right: 12px;
    text-align: center;
    font-size: 1.1rem;
}

/* Premium Stats Cards */
.stats-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.9;
    z-index: -1;
}

.stats-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%); }
    50% { transform: translateX(100%) translateY(100%); }
}

.stats-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-heavy);
}

.stats-card.success::before {
    background: var(--gradient-success);
}

.stats-card.warning::before {
    background: var(--gradient-warning);
}

.stats-card.danger::before {
    background: var(--gradient-danger);
}

.stats-card.info::before {
    background: var(--gradient-info);
}

.stats-card i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.stats-card h4 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.stats-card p {
    margin: 0;
    opacity: 0.9;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Premium Page Header */
.page-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 var(--border-radius-large) var(--border-radius-large);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.9;
    z-index: -1;
}

.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: headerGlow 8s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.page-header .container-fluid {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Premium Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner-border {
    width: 4rem;
    height: 4rem;
    border-width: 0.4em;
    border-color: rgba(255,255,255,0.3);
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Premium Animations */
.fade-in {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-50px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from { 
        opacity: 0; 
        transform: translateX(50px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% { 
        opacity: 0; 
        transform: scale(0.3); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.05); 
    }
    70% { 
        transform: scale(0.9); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* Premium Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.shadow-premium {
    box-shadow: var(--shadow-medium);
}

.border-radius-premium {
    border-radius: var(--border-radius);
}

.transition-premium {
    transition: var(--transition);
}

/* Premium Responsive Design */
@media (max-width: 768px) {
    .page-header {
        padding: 2.5rem 0;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .stats-card {
        padding: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .stats-card h4 {
        font-size: 2.5rem;
    }
    
    .sidebar {
        min-height: auto;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .stats-card h4 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem;
    }
}

/* Premium Print Styles */
@media print {
    .sidebar,
    .page-header,
    .btn,
    .modal {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        background: white !important;
    }
    
    .table {
        font-size: 12px;
        background: white !important;
    }
    
    body {
        background: white !important;
    }
}

/* Premium Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #1a1a2e;
        --dark-color: #16213e;
    }
}

/* Premium Focus States */
*:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Premium Selection */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}