/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

/* Container for centering content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, .heading {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    h1, .heading {
        font-size: 2.5rem;
    }
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    color: #1e293b;
    background-color: #fff;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input.error {
    border-color: #ef4444;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-primary {
    background-color: #3b82f6;
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline-primary {
    border: 1px solid #3b82f6;
    color: #3b82f6;
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: #f8fafc;
    color: #2563eb;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.message.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #f77171;
}

/* Form container */
.form-container {
    max-width: 28rem;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive design for forms */
@media (max-width: 640px) {
    .form-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .btn {
        width: 100%;
    }
}

/* Reusable utilities */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

/* Dashboard Styles */
.sidebar {
    background-color: #f1f5f9;
    color: #1e293b;
    width: 250px;
    height: calc(100vh - 56px);
    position: fixed;
    top: 56px;
    left: 0;
    padding: 1.5rem;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link {
    color: #4b5563;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    position: relative;
}

.sidebar .nav-link:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.sidebar .nav-link.active {
    background-color: #3b82f6;
    color: #ffffff;
}

.sidebar .nav-link.active .chevron-icon {
    color: #ffffff;
}

.sidebar .nav-link i:not(.chevron-icon) {
    width: 24px;
    text-align: center;
    margin-right: 0.5rem;
}

.sidebar .nav-item .collapse .nav-link {
    padding-left: 2.5rem;
    font-size: 0.8125rem;
}

.sidebar .nav-item .collapse .nav-link.active {
    background-color: #d1d5db;
    color: #1e293b;
}

.sidebar h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.offcanvas {
    background-color: #f1f5f9;
    width: 250px !important;
}

.offcanvas .nav-link {
    color: #4b5563;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
}

.offcanvas .nav-link:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.offcanvas .nav-link.active {
    background-color: #3b82f6;
    color: #ffffff;
}

.offcanvas .nav-link.active .chevron-icon {
    color: #ffffff;
}

.offcanvas .nav-link i:not(.chevron-icon) {
    width: 24px;
    text-align: center;
    margin-right: 0.5rem;
}

.offcanvas .nav-item .collapse .nav-link {
    padding-left: 2.5rem;
    font-size: 0.8125rem;
}

.offcanvas .nav-item .collapse .nav-link.active {
    background-color: #d1d5db;
    color: #1e293b;
}

.main-content {
    margin-left: 250px;
    margin-top: 56px;
    padding: 2rem;
    background-color: #f8fafc;
    min-height: calc(100vh - 56px);
}

.navbar-text h4 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #1e293b;
    margin: 0;
}

.navbar-brand img {
    width: 40px;
    height: 40px;
    border-radius: 0.25rem;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
}

.dropdown-item {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    color: #1e293b;
}

.dropdown-item:hover {
    background-color: #f8fafc;
    color: #3b82f6;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.card-text {
    color: #4b5563;
}

/* Table Styles */
.table {
    font-size: 0.875rem;
    color: #1e293b;
}

.table th {
    background-color: #e2e8f0;
    color: #1e293b;
    font-weight: 600;
    padding: 0.75rem;
    border-bottom: 2px solid #d1d5db;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #e5e7eb;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8fafc;
}

.table-hover tbody tr:hover {
    background-color: #e2e8f0;
}

.table-responsive {
    border-radius: 0.375rem;
    overflow-x: auto;
}

/* Badge Styles */
.badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
}

.bg-success {
    background-color: #22c55e;
    color: #fff;
}

.bg-danger {
    background-color: #ef4444;
    color: #fff;
}

/* Input Group for Search */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 0.75rem 1rem;
}

/* Chevron Icon for Collapsible Menus */
.chevron-icon {
    font-size: 0.75rem;
    color: #4b5563;
    float: right;
    margin-top: 0.25rem;
}

/* Responsive design for dashboard */
@media (max-width: 991px) {
    .sidebar {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        margin-top: 56px;
        padding: 1.5rem;
    }

    .navbar-text {
        display: none !important;
    }

    .table-responsive {
        margin-bottom: 1rem;
    }

    .table th, .table td {
        font-size: 0.8125rem;
        padding: 0.5rem;
    }
}