@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    
    --bg-main: #f8fafc;
    --bg-sidebar: #0f172a;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #ffffff;
    
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.5rem;
}

.sidebar-brand span {
    color: var(--primary);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.sidebar-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-link.active {
    color: #fff;
    background-color: var(--primary);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-top: auto;
}

/* Main Content */
.main-wrapper {
    margin-left: 260px;
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    height: 70px;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-title {
    font-size: 1.25rem;
    color: var(--text-main);
}

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

.user-info {
    text-align: right;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-logout:hover {
    color: var(--danger);
    background-color: var(--danger-light);
}

/* Page Container */
.content-body {
    padding: 2rem;
    flex-grow: 1;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
}

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

.icon-primary { background-color: var(--primary-light); color: var(--primary); }
.icon-success { background-color: var(--success-light); color: var(--success); }
.icon-danger { background-color: var(--danger-light); color: var(--danger); }
.icon-warning { background-color: var(--warning-light); color: var(--warning); }

/* Dashboard Lists Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-body {
    padding: 1.5rem;
}

/* Custom Table style */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.custom-table th {
    padding: 0.75rem 1rem;
    background-color: #f1f5f9;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.custom-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-success { background-color: var(--success-light); color: var(--success); }
.badge-danger { background-color: var(--danger-light); color: var(--danger); }
.badge-warning { background-color: var(--warning-light); color: var(--warning); }
.badge-primary { background-color: var(--primary-light); color: var(--primary); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-primary { background-color: var(--primary); color: #fff; }
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-success { background-color: var(--success); color: #fff; }
.btn-success:hover { opacity: 0.9; }

.btn-danger { background-color: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }

.btn-secondary { background-color: #e2e8f0; color: var(--text-main); }
.btn-secondary:hover { background-color: #cbd5e1; }

.btn-outline { border-color: var(--border-color); color: var(--text-muted); background-color: #fff; }
.btn-outline:hover { color: var(--text-main); background-color: #f8fafc; }

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success { background-color: var(--success-light); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.alert-danger { background-color: var(--danger-light); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.375rem;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: #fff;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Modal styles (simplified for pure CSS / overlay forms) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 110;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay:target,
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: #fff;
    border-radius: var(--radius);
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-overlay:target .modal-container,
.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-main);
}

/* Grid Details */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-item {
    margin-bottom: 0.5rem;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.info-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

/* Custom login layout */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0f172a;
    padding: 1rem;
}

.login-card {
    background-color: #fff;
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2.5rem 2rem;
}

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

.login-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--bg-sidebar);
}

.login-logo span {
    color: var(--primary);
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Grid system */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}
.row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}
.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}
.row.g-3 {
    margin-right: calc(-.5 * var(--bs-gutter-x));
    margin-left: calc(-.5 * var(--bs-gutter-x));
    margin-top: calc(-1 * var(--bs-gutter-y));
}
.row.g-3 > * {
    padding-right: calc(.5 * var(--bs-gutter-x));
    padding-left: calc(.5 * var(--bs-gutter-x));
    margin-top: var(--bs-gutter-y);
}
@media (min-width: 768px) {
    .col-md-3 {
        flex: 0 0 auto;
        width: 25%;
    }
    .col-md-4 {
        flex: 0 0 auto;
        width: 33.33333333%;
    }
    .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
    }
    .col-md-8 {
        flex: 0 0 auto;
        width: 66.66666667%;
    }
    .col-md-9 {
        flex: 0 0 auto;
        width: 75%;
    }
    .col-md-12 {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* Sidebar toggle and responsive rules */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    z-index: 95;
    transition: opacity var(--transition);
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: inline-flex;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .admin-header {
        padding: 0 1.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .content-body {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .card-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        height: 60px;
        padding: 0 1rem;
    }
    
    .header-user .user-info {
        display: none;
    }
    
    /* Make buttons and inputs fit small screens nicely */
    .row.g-3 > .col-md-3 {
        margin-top: 0.75rem;
    }
}

/* Responsive Grid Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .detail-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Laravel Pagination Custom Styles */
nav[role="navigation"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

nav[role="navigation"] svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
    display: inline-block;
    vertical-align: middle;
}

nav[role="navigation"] .hidden {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

@media (max-width: 640px) {
    nav[role="navigation"] .hidden {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        text-align: center;
    }
}

nav[role="navigation"] div > p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

nav[role="navigation"] div > p span {
    font-weight: 600;
    color: var(--text-main);
}

nav[role="navigation"] span.relative,
nav[role="navigation"] div.relative {
    display: inline-flex;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-card);
    overflow: hidden;
}

nav[role="navigation"] a,
nav[role="navigation"] span[aria-current="page"] > span,
nav[role="navigation"] span[aria-disabled="true"] > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border-color);
    margin-left: -1px;
    transition: var(--transition);
}

nav[role="navigation"] a {
    color: var(--text-main);
    background-color: var(--bg-card);
}

nav[role="navigation"] a:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    z-index: 10;
}

nav[role="navigation"] span[aria-current="page"] > span {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    z-index: 20;
}

nav[role="navigation"] span[aria-disabled="true"] > span {
    color: var(--text-muted);
    background-color: var(--bg-main);
    cursor: not-allowed;
}

nav[role="navigation"] .flex-1.sm\:hidden {
    display: none !important;
}


