:root {

    --primary: #2563eb;
    --primary-dark: #1d4ed8;

    --secondary: #64748b;

    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;

    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: #2563eb;

    --body-bg: #f1f5f9;

    --card-bg: #ffffff;

    --text-primary: #0f172a;
    --text-secondary: #64748b;

    --border-color: #e2e8f0;

    --border-radius: 14px;

    --sidebar-width: 270px;
}


/* --------------------------------------------------
   GLOBAL
-------------------------------------------------- */

* {
    box-sizing: border-box;
}

body {

    margin: 0;

    font-family:
        'Inter',
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    background: var(--body-bg);

    color: var(--text-primary);

    font-size: 14px;
}


/* --------------------------------------------------
   APP LAYOUT
-------------------------------------------------- */

.app-wrapper {

    min-height: 100vh;

    display: flex;
}


/* --------------------------------------------------
   SIDEBAR
-------------------------------------------------- */

.app-sidebar {

    width: var(--sidebar-width);

    min-height: 100vh;

    background: var(--sidebar-bg);

    color: #ffffff;

    position: fixed;

    left: 0;
    top: 0;

    z-index: 1040;

    transition: all 0.3s ease;
}


.sidebar-brand {

    height: 72px;

    display: flex;

    align-items: center;

    padding: 0 24px;

    border-bottom:
        1px solid rgba(255,255,255,0.08);
}


.sidebar-brand-name {

    font-size: 18px;

    font-weight: 700;

    color: #ffffff;
}


.sidebar-menu {

    padding: 18px 12px;
}


.sidebar-menu a {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px 14px;

    margin-bottom: 5px;

    color: #cbd5e1;

    text-decoration: none;

    border-radius: 10px;

    transition: all 0.2s ease;
}


.sidebar-menu a:hover {

    background: var(--sidebar-hover);

    color: #ffffff;
}


.sidebar-menu a.active {

    background: var(--sidebar-active);

    color: #ffffff;
}


.sidebar-menu i {

    font-size: 18px;
}


/* --------------------------------------------------
   MAIN CONTENT
-------------------------------------------------- */

.main-content {

    margin-left: var(--sidebar-width);

    width: calc(100% - var(--sidebar-width));

    min-height: 100vh;
}


.content-wrapper {

    padding: 28px;
}


/* --------------------------------------------------
   TOPBAR
-------------------------------------------------- */

.topbar {

    height: 72px;

    background: #ffffff;

    border-bottom:
        1px solid var(--border-color);

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 28px;
}


/* --------------------------------------------------
   PAGE HEADER
-------------------------------------------------- */

.page-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 24px;
}


.page-title {

    margin: 0;

    font-size: 24px;

    font-weight: 700;
}


.page-subtitle {

    color: var(--text-secondary);

    margin-top: 5px;
}


/* --------------------------------------------------
   CARDS
-------------------------------------------------- */

.app-card {

    background: var(--card-bg);

    border:
        1px solid var(--border-color);

    border-radius:
        var(--border-radius);

    padding: 22px;

    box-shadow:
        0 2px 6px rgba(15, 23, 42, 0.03);
}


.stat-card {

    background: #ffffff;

    border:
        1px solid var(--border-color);

    border-radius:
        var(--border-radius);

    padding: 22px;

    height: 100%;
}


.stat-label {

    color: var(--text-secondary);

    font-size: 13px;

    font-weight: 500;
}


.stat-value {

    margin-top: 8px;

    font-size: 28px;

    font-weight: 700;
}


/* --------------------------------------------------
   BUTTONS
-------------------------------------------------- */

.btn {

    border-radius: 9px;

    font-weight: 500;

    padding:
        9px 16px;
}


.btn-primary {

    background: var(--primary);

    border-color: var(--primary);
}


.btn-primary:hover {

    background: var(--primary-dark);

    border-color: var(--primary-dark);
}


/* --------------------------------------------------
   FORMS
-------------------------------------------------- */

.form-label {

    font-weight: 600;

    color: var(--text-primary);

    margin-bottom: 7px;
}


.form-control,
.form-select {

    min-height: 44px;

    border-color:
        var(--border-color);

    border-radius: 9px;

    font-size: 14px;
}


.form-control:focus,
.form-select:focus {

    border-color:
        var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.12);
}


/* --------------------------------------------------
   TABLES
-------------------------------------------------- */

.app-table {

    margin-bottom: 0;
}


.app-table thead th {

    background: #f8fafc;

    color: var(--text-secondary);

    font-size: 12px;

    font-weight: 600;

    text-transform: uppercase;

    border-bottom:
        1px solid var(--border-color);

    padding: 14px 16px;
}


.app-table tbody td {

    padding: 16px;

    vertical-align: middle;

    border-color:
        var(--border-color);
}


/* --------------------------------------------------
   BADGES
-------------------------------------------------- */

.status-badge {

    display: inline-flex;

    align-items: center;

    padding: 5px 10px;

    border-radius: 20px;

    font-size: 12px;

    font-weight: 600;
}


.status-active {

    background: #dcfce7;

    color: #166534;
}


.status-pending {

    background: #fef3c7;

    color: #92400e;
}


.status-cancelled {

    background: #fee2e2;

    color: #991b1b;
}


/* --------------------------------------------------
   MOBILE
-------------------------------------------------- */

.mobile-menu-button {

    display: none;
}


@media (max-width: 991px) {

    .app-sidebar {

        transform:
            translateX(-100%);
    }

    .app-sidebar.show {

        transform:
            translateX(0);
    }

    .main-content {

        margin-left: 0;

        width: 100%;
    }

    .mobile-menu-button {

        display: inline-flex;
    }

}


@media (max-width: 767px) {

    .content-wrapper {

        padding: 18px;
    }

    .topbar {

        padding: 0 18px;
    }

    .page-header {

        flex-direction: column;

        align-items: flex-start;

        gap: 15px;
    }

    .page-header .btn {

        width: 100%;
    }

}

/* --------------------------------------------------
   AUTHENTICATION
-------------------------------------------------- */

.auth-page {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 24px;

    background:
        linear-gradient(
            135deg,
            #0f172a 0%,
            #1e3a8a 100%
        );
}


.auth-container {

    width: 100%;

    max-width: 460px;
}


.auth-card {

    background: #ffffff;

    border-radius: 18px;

    padding: 36px;

    box-shadow:
        0 25px 60px
        rgba(15, 23, 42, 0.25);
}


.auth-brand {

    text-align: center;

    margin-bottom: 30px;
}


.auth-brand-icon {

    width: 64px;

    height: 64px;

    margin: 0 auto 16px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: var(--primary);

    color: #ffffff;

    border-radius: 16px;

    font-size: 28px;
}


.auth-title {

    font-size: 24px;

    font-weight: 700;

    margin-bottom: 8px;
}


.auth-subtitle {

    color: var(--text-secondary);

    margin-bottom: 0;
}


.auth-footer {

    margin-top: 24px;

    text-align: center;

    font-size: 13px;

    color: var(--text-secondary);
}


@media (max-width: 576px) {

    .auth-page {

        padding: 16px;

    }

    .auth-card {

        padding: 26px 22px;

        border-radius: 14px;

    }

}

.status-draft {
    background: #e0e7ff;
    color: #3730a3;
}

.status-inactive {
    background: #f1f5f9;
    color: #475569;
}

.status-completed {
    background: #e0f2fe;
    color: #075985;
}

/* --------------------------------------------------
   PAGINATION
-------------------------------------------------- */

.pagination {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.pagination .page-item {
    display: inline-flex;
    align-items: center;
}

.pagination .page-link {
    min-width: 34px;
    height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 9px;

    border: 1px solid var(--border-color);

    border-radius: 8px;

    background: #ffffff;

    color: var(--text-secondary);

    font-size: 13px;
    font-weight: 500;

    line-height: 1;

    text-decoration: none;

    box-shadow: none;
}

.pagination .page-link:hover {
    background: #f8fafc;
    color: var(--primary);
    border-color: #cbd5e1;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.pagination .page-item.disabled .page-link {
    background: #f8fafc;
    color: #cbd5e1;
    border-color: var(--border-color);
    cursor: not-allowed;
}


/* --------------------------------------------------
   LARAVEL PAGINATION SVG FIX
-------------------------------------------------- */

.pagination svg,
.pagination .page-link svg {
    width: 16px !important;
    height: 16px !important;

    max-width: 16px !important;
    max-height: 16px !important;

    display: block;

    vertical-align: middle;
}


/* --------------------------------------------------
   PREVIOUS / NEXT
-------------------------------------------------- */

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    min-width: 34px;

    padding-left: 8px;
    padding-right: 8px;
}


/* --------------------------------------------------
   MOBILE
-------------------------------------------------- */

@media (max-width: 576px) {

    .pagination {
        gap: 3px;
    }

    .pagination .page-link {
        min-width: 32px;
        height: 32px;

        padding: 0 7px;

        font-size: 12px;
    }

    .pagination svg,
    .pagination .page-link svg {
        width: 14px !important;
        height: 14px !important;

        max-width: 14px !important;
        max-height: 14px !important;
    }

}
