﻿:root {
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --sidebar-bg: #ffffff;
    --main-bg: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--main-bg);
    color: var(--text-main);
    overflow-x: hidden;
}


.link {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

.link:hover {
    text-decoration: underline;
}

textarea, input{
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

/* IMPORTANT!! This will be blocked in the beginning */
.container {
    /* display: flex; */
    display: none;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-image: url('../images/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 8px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
}

.sidebar-nav {
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.nav-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    background-color: #cbd5e1;
    border-radius: 50%;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.user-plan {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Content Area */
.content {
    flex: 1;
    margin-left: 260px;
    padding: 32px 40px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.header-search input {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 300px;
    outline: none;
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-notification {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Dashboard Elements */
h1 {
    font-size: 1.75rem;
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: var(--white);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    display: block;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-trend {
    font-size: 0.75rem;
    font-weight: 500;
}

.positive {
    color: #10b981;
}

.negative {
    color: #ef4444;
}

/* Table Styles */
.data-table-container {
    background-color: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 24px;
}

.data-table-container h3 {
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
}

.data-table td {
    padding: 16px 12px;
    font-size: 0.9rem;
}

.data-table tr {
    border-bottom: 1px solid var(--border-color);
}

.badge {
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge.neutral {
    background-color: #f1f5f9;
    color: #64748b;
}

.success {
    background-color: #dcfce7;
    color: #166534;
}

.warning {
    background-color: #fef9c3;
    color: #854d0e;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

.short {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* loading =========================== */
/* Semi-transparent gray background overlay */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(128, 128, 128, 0.5);
    /* Gray with 50% transparency */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Transparent container for the spinner */
.spinner-container {
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The spinner/circle */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
/* toast =========================== */
/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
    width: 100%;
}

/* Toast Notification */
.toast {
    background: white;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
    position: relative;
    border-left: 4px solid;
    pointer-events: auto;
}

/* Toast Types */
.toast-info {
    border-left-color: #2196f3;
    background: linear-gradient(135deg, #ffffff 0%, #f3f9ff 100%);
}

.toast-success {
    border-left-color: #4caf50;
    background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
}

.toast-warning {
    border-left-color: #ff9800;
    background: linear-gradient(135deg, #ffffff 0%, #fff9f0 100%);
}

.toast-error {
    border-left-color: #f44336;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
}

/* Toast Icons */
.toast-icon {
    line-height: 1;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-info .toast-icon::before {
    content: "ℹ️";
    font-size: 18px;
}

.toast-success .toast-icon::before {
    content: "✓";
    font-size: 18px;
    font-weight: bold;
    color: #4caf50;
}

.toast-warning .toast-icon::before {
    content: "⚠️";
    font-size: 18px;
}

.toast-error .toast-icon::before {
    content: "✗";
    font-size: 18px;
    font-weight: bold;
    color: #f44336;
}

/* Toast Content */
.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 14px;
    color: #333;
}

.toast-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Close Button */
.toast-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-close:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-hide {
    animation: slideOut 0.3s ease-out forwards;
}

/* Readonly ========== */
.readonly {
    pointer-events: none;
    opacity: 0.4;
    filter: brightness(0.5);
}

/* checkbox */
.form-group-checkbox2{
    margin-top : 20px;
    margin-bottom: 16px;
}

.form-group-checkbox2 input[type="checkbox"]{
    transform: scale(1.3);
    margin-right: 10px;
}
