/* assets/style.css */

/* Reset & Variables */
:root {
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(0, 0, 0, 0.08);
    --card-hover-border: rgba(99, 102, 241, 0.45);
    
    --primary: #4f46e5; /* Deep Indigo */
    --primary-hover: #4338ca;
    --accent: #7c3aed; /* Violet */
    --accent-glow: rgba(124, 58, 237, 0.15);
    --cyan: #0891b2; /* Cyan */
    --success: #059669; /* Emerald */
    --danger: #dc2626; /* Red */
    --warning: #d97706; /* Amber */
    
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #64748b; /* Slate 500 */
    --text-light: #94a3b8; /* Slate 400 */
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header */
.app-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.15));
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo-text .highlight {
    background: linear-gradient(135deg, var(--cyan), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.04);
}

.nav-item.active {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 500;
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.03);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-logout {
    color: var(--text-muted);
    font-size: 1.2rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.btn-logout:hover {
    color: var(--danger);
    background: rgba(220, 38, 38, 0.08);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

.main-content.full-width {
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Cards & Glassmorphism */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: var(--card-hover-border);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* Login Layout */
.login-container {
    width: 100%;
    max-width: 420px;
    margin: 2rem auto;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.2));
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    pointer-events: none;
}

.form-control {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.input-wrapper .form-control {
    padding-left: 2.75rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--accent));
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--card-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-danger {
    background: rgba(220, 38, 38, 0.08);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.btn-danger:hover {
    background: var(--danger);
    color: #ffffff;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #047857);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(5, 150, 105, 0.2);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgba(5, 150, 105, 0.3);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Page Header & Grid Layout */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.page-title p {
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(220, 38, 38, 0.06);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.15);
}

.alert-success {
    background: rgba(5, 150, 105, 0.06);
    color: #047857;
    border-color: rgba(5, 150, 105, 0.15);
}

.alert-info {
    background: rgba(8, 145, 178, 0.06);
    color: #0369a1;
    border-color: rgba(8, 145, 178, 0.15);
}

/* Dashboard List & Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background: #ffffff;
}

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

.table th, .table td {
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    color: var(--text-main);
    font-size: 0.95rem;
}

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

.table tr:hover td {
    background: rgba(0, 0, 0, 0.01);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-info {
    background: rgba(8, 145, 178, 0.08);
    color: #0369a1;
    border: 1px solid rgba(8, 145, 178, 0.2);
}

.badge-success {
    background: rgba(5, 150, 105, 0.08);
    color: #047857;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

/* Detail Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
}

.stat-icon.success {
    background: rgba(5, 150, 105, 0.08);
    color: var(--success);
}

.stat-icon.warning {
    background: rgba(217, 119, 6, 0.08);
    color: var(--warning);
}

.stat-icon.cyan {
    background: rgba(8, 145, 178, 0.08);
    color: var(--cyan);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* File Upload drag & drop zone */
.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.6);
    position: relative;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.03);
}

.upload-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.upload-zone:hover .upload-icon {
    color: var(--primary);
    transform: translateY(-5px);
}

.upload-zone h3 {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.upload-zone p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Footer */
.app-footer {
    background: #ffffff;
    border-top: 1px solid var(--card-border);
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.01);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

/* Action icons */
.action-icons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--card-border);
    text-decoration: none;
    transition: var(--transition);
}

.action-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.action-btn.btn-view {
    color: var(--primary);
}
.action-btn.btn-view:hover {
    background: rgba(79, 70, 229, 0.08);
}

.action-btn.btn-pdf {
    color: var(--success);
}
.action-btn.btn-pdf:hover {
    background: rgba(5, 150, 105, 0.08);
}

.action-btn.btn-del {
    color: var(--danger);
}
.action-btn.btn-del:hover {
    background: rgba(220, 38, 38, 0.08);
}

/* Grid splits */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid-2col {
        grid-template-columns: 1fr;
    }
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
}
