/* assets/css/style.css */

/* Custom Variables */
:root {
    --primary: #2c3e50;
    --primary-dark: #1a252f;
    --secondary: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --white: #ffffff;
    --border-radius: 10px;
    --box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container padding for mobile */
.container {
    padding-left: 15px;
    padding-right: 15px;
}

/* Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    background: var(--white);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.card-header {
    border-bottom: none;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.card-header.bg-primary {
    background: var(--secondary) !important;
}

.card-header.bg-success {
    background: var(--success) !important;
}

.card-header.bg-warning {
    background: var(--warning) !important;
    color: var(--dark);
}

.card-header.bg-danger {
    background: var(--danger) !important;
}

.card-header.bg-info {
    background: var(--info) !important;
}

.card-title {
    margin-bottom: 0;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--secondary);
    border: none;
    color: var(--white);
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

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

.btn-success {
    background: var(--success);
    border: none;
    color: var(--white);
}

.btn-success:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning);
    border: none;
    color: var(--dark);
}

.btn-warning:hover {
    background: #e67e22;
    transform: translateY(-2px);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    border: none;
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--secondary);
    background: transparent;
    color: var(--secondary);
}

.btn-outline-primary:hover {
    background: var(--secondary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid var(--white);
    background: transparent;
    color: var(--white);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--secondary);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.875rem;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    transition: var(--transition);
    width: 100%;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    outline: none;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark);
}

.form-text {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 5px;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
    background-color: transparent;
}

.table thead th {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px;
    font-weight: 600;
}

.table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

.table tbody tr:hover {
    background: rgba(52, 152, 219, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,0.02);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning);
}

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

/* Profile Picture */
.profile-pic {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--secondary);
    box-shadow: var(--box-shadow);
}

/* Dashboard Stats */
.stat-card {
    text-align: center;
    padding: 20px;
    border-radius: var(--border-radius);
    background: var(--white);
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.stat-card i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.stat-card h3 {
    font-size: 2rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.stat-card p {
    color: var(--gray);
    margin-bottom: 0;
}

/* ID Card Styles */
.id-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 15px;
    padding: 30px;
    color: var(--white);
    transition: var(--transition);
    max-width: 500px;
    margin: 0 auto;
}

.id-card:hover {
    transform: scale(1.02);
}

/* Footer */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer h5 {
    margin-bottom: 20px;
    font-weight: 600;
}

.footer hr {
    background-color: rgba(255,255,255,0.1);
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .profile-pic {
        width: 100px;
        height: 100px;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .stat-card i {
        font-size: 2rem;
    }
    
    .btn {
        padding: 8px 16px;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .card-header h4, .card-header h5 {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .id-card {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .stat-card {
        margin-bottom: 15px;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody td {
        display: block;
        text-align: right;
        padding-left: 50%;
        position: relative;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        text-align: left;
        font-weight: bold;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

.slide-in {
    animation: slideIn 0.3s ease forwards;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.spinner-primary {
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-top-color: var(--secondary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-primary { color: var(--secondary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--gray) !important; }
.text-white { color: var(--white) !important; }
.text-dark { color: var(--dark) !important; }

.bg-primary { background: var(--secondary) !important; }
.bg-success { background: var(--success) !important; }
.bg-warning { background: var(--warning) !important; }
.bg-danger { background: var(--danger) !important; }
.bg-light { background: var(--light) !important; }
.bg-dark { background: var(--dark) !important; }
.bg-white { background: var(--white) !important; }

.shadow-sm { box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.shadow-md { box-shadow: 0 5px 15px rgba(0,0,0,0.08); }
.shadow-lg { box-shadow: 0 10px 30px rgba(0,0,0,0.12); }

.rounded-sm { border-radius: 5px; }
.rounded-md { border-radius: 10px; }
.rounded-lg { border-radius: 15px; }

.cursor-pointer { cursor: pointer; }
.transition { transition: var(--transition); }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

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

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

.m-0 { margin: 0; }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 30px; }

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

.p-0 { padding: 0; }
.p-1 { padding: 5px; }
.p-2 { padding: 10px; }
.p-3 { padding: 15px; }
.p-4 { padding: 20px; }
.p-5 { padding: 30px; }