/* ==================== Naxis Admin Panel - Styles ==================== */

/* Login gradient */
.login-gradient {
    background: linear-gradient(135deg, #0a1628 0%, #08519b 50%, #063d75 100%);
    min-height: 100vh;
}

/* Sidebar transitions */
.sidebar-transition {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 1023px) {
    #sidebar {
        transform: translateX(-100%);
    }
    #sidebar.open {
        transform: translateX(0);
    }
}

/* Nav item active state */
.nav-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.nav-item.active svg {
    color: #4a87d1;
}

/* Stats cards */
.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 20px rgba(8, 81, 155, 0.08);
    transform: translateY(-1px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table thead th:first-child {
    border-radius: 0.75rem 0 0 0;
}

.data-table thead th:last-child {
    border-radius: 0 0.75rem 0 0;
}

.data-table tbody td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: #f8f9fb;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.badge-green {
    background: #d4edda;
    color: #155724;
}

.badge-red {
    background: #f8d7da;
    color: #721c24;
}

.badge-blue {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-orange {
    background: #fff3cd;
    color: #856404;
}

.badge-gray {
    background: #e9ecef;
    color: #495057;
}

/* Toast notifications */
.toast {
    min-width: 320px;
    max-width: 420px;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.toast-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.toast-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.toast-warning {
    background: #fffbeb;
    border: 1px solid #fed7aa;
    color: #92400e;
}

.toast-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(100%) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(100%) scale(0.95); }
}

.toast.removing {
    animation: toast-out 0.2s ease forwards;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
    animation: fade-in 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: 1.25rem;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    animation: modal-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content.wide {
    max-width: 800px;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Form styles */
.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    color: #1a1a1a;
    background: white;
    transition: all 0.15s ease;
}

.form-input:focus {
    outline: none;
    border-color: #08519b;
    box-shadow: 0 0 0 3px rgba(8, 81, 155, 0.1);
}

.form-input::placeholder {
    color: #adb5bd;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.375rem;
}

.form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    color: #1a1a1a;
    background: white;
    transition: all 0.15s ease;
    appearance: auto;
}

.form-select:focus {
    outline: none;
    border-color: #08519b;
    box-shadow: 0 0 0 3px rgba(8, 81, 155, 0.1);
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #08519b;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #063d75;
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover:not(:disabled) {
    background: #e9ecef;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: transparent;
    color: #6c757d;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-icon:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination button {
    min-width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    background: transparent;
    color: #495057;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pagination button:hover:not(:disabled) {
    background: #f0f0f0;
}

.pagination button.active {
    background: #08519b;
    color: white;
    border-color: #08519b;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #08519b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    opacity: 0.4;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Toggle switch */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #dee2e6;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.toggle.active {
    background: #28a745;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle.active::after {
    transform: translateX(20px);
}

/* Search input */
.search-input {
    position: relative;
}

.search-input svg {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.125rem;
    height: 1.125rem;
    color: #adb5bd;
}

.search-input input {
    padding-left: 2.75rem;
}

/* User type icons */
.type-hekim { color: #08519b; }
.type-teknisyen { color: #6f42c1; }
.type-lab { color: #fd7e14; }

/* Chart bars */
.chart-bar {
    height: 8px;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card */
.card {
    background: white;
    border-radius: 1rem;
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 1.5rem;
}
