/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #C8E6C9;
    --accent-color: #2196F3;
    --accent-dark: #1976D2;
    --accent-light: #BBDEFB;
    --red: #F44336;
    --red-light: #FFEBEE;
    --yellow: #FFC107;
    --yellow-light: #FFF8E1;
    --green: #4CAF50;
    --green-light: #E8F5E9;
    --purple: #9C27B0;
    --purple-light: #F3E5F5;
    --gray-100: #f7f7f7;
    --gray-200: #e6e6e6;
    --gray-300: #d5d5d5;
    --gray-400: #b0b0b0;
    --gray-500: #909090;
    --gray-600: #707070;
    --gray-700: #505050;
    --gray-800: #303030;
    --gray-900: #202020;
    --gradient: linear-gradient(135deg, #4CAF50 0%, #2196F3 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: var(--gray-100);
    min-height: 100vh;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-dark);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hidden {
    display: none !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.heading-primary {
    font-size: 1.875rem;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.heading-secondary {
    font-size: 1.25rem;
    color: var(--gray-600);
    font-weight: 500;
}

.text-center {
    text-align: center;
}

.text-gray {
    color: var(--gray-600);
}

.highlight-text {
    color: var(--accent-color);
    font-weight: 600;
}

.section-title {
    font-size: 1.5rem;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.section-subtitle {
    color: var(--gray-600);
    font-size: 0.9375rem;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    border-radius: var(--radius-md);
    transition: var(--transition);
    border: none;
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.25);
}

.btn-primary {
    color: white;
    background: var(--gradient);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--gray-700);
    background-color: white;
    border: 1px solid var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--gray-100);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    color: var(--accent-color);
    background-color: transparent;
    border: 1px solid var(--accent-color);
}

.btn-outline:hover {
    color: white;
    background-color: var(--accent-color);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Forms */
.form-container {
    padding: 1.5rem;
}

.form-heading {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.form-row > .form-group {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

.form-group.half {
    flex: 0 0 50%;
    max-width: 50%;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: white;
    background-clip: padding-box;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    color: var(--gray-800);
    background-color: white;
    border-color: var(--accent-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.25);
}

.forgot-password {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.forgot-password a {
    font-size: 0.875rem;
}

/* Login Page */
.page {
    min-height: 100vh;
    background-color: var(--gray-100);
}

.flex-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background-color: white;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.logo-icon-sm {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.card {
    background-color: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 28rem;
}

.tab-container {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
}

.tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--gray-500);
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.footer-text {
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Dashboard Layout */
.top-nav {
    background-color: white;
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-left: 0.5rem;
    color: var(--gray-800);
}

.nav-actions {
    display: flex;
    align-items: center;
}

.notification-bell {
    position: relative;
    margin-right: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
}

.notification-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: white;
    background-color: var(--red);
    border-radius: 50%;
    transform: scale(0.8);
}

.user-profile {
    display: flex;
    align-items: center;
    border-left: 1px solid var(--gray-200);
    padding-left: 1.5rem;
}

.avatar {
    height: 2rem;
    width: 2rem;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-800);
}

.logout-btn {
    font-size: 0.75rem;
    color: var(--red);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 4rem);
}

.sidebar {
    width: 16rem;
    background-color: white;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-title-sm {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 500;
}

.sidebar-nav {
    padding: 0.5rem;
}

.sidebar-nav-group {
    display: flex;
    flex-direction: column;
}

.sidebar-section-title {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    border-radius: var(--radius-md);
    transition: var(--transition);
    margin-bottom: 0.25rem;
}

.sidebar-item i {
    font-size: 1rem;
    margin-right: 0.75rem;
    color: var(--gray-600);
}

.sidebar-item:hover {
    background-color: var(--gray-100);
    color: var(--accent-color);
}

.sidebar-item:hover i {
    color: var(--accent-color);
}

.sidebar-item.active {
    background-color: var(--accent-light);
    color: var(--accent-dark);
    font-weight: 500;
    border-left: 4px solid var(--accent-color);
}

.sidebar-item.active i {
    color: var(--accent-color);
}

.main-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.dashboard-section {
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Dashboard Components */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.stat-card-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-size: 1.25rem;
}

.stat-icon.blue {
    background-color: var(--accent-light);
    color: var(--accent-color);
}

.stat-icon.green {
    background-color: var(--green-light);
    color: var(--green);
}

.stat-icon.yellow {
    background-color: var(--yellow-light);
    color: var(--yellow);
}

.stat-icon.purple {
    background-color: var(--purple-light);
    color: var(--purple);
}

.stat-footer {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.stat-trend {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.stat-trend i {
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.stat-trend.positive {
    color: var(--green);
}

.stat-trend.negative {
    color: var(--red);
}

.stat-period {
    color: var(--gray-500);
    margin-left: 0.5rem;
}

/* Data Tables */
.data-table-container {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.data-table-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.data-table-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.data-table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background-color: var(--gray-50);
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-500);
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table .highlight {
    color: var(--accent-color);
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.status-badge.red {
    background-color: var(--red-light);
    color: var(--red);
}

.status-badge.yellow {
    background-color: var(--yellow-light);
    color: var(--yellow);
}

.status-badge.green {
    background-color: var(--green-light);
    color: var(--green);
}

.action-link {
    color: var(--accent-color);
    font-weight: 500;
}

.data-table-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.view-all-link {
    color: var(--accent-color);
    font-weight: 500;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.pagination-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--accent-color);
    font-weight: 500;
    cursor: pointer;
}

.pagination-btn:disabled {
    color: var(--gray-400);
    cursor: not-allowed;
}

.pagination-btn i {
    margin: 0 0.5rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Filter Controls */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
}

.filter-group label {
    font-size: 0.875rem;
    margin-right: 0.5rem;
    margin-bottom: 0;
}

.filter-group select,
.filter-group input {
    width: auto;
    font-size: 0.875rem;
}

/* Charts and Reports */
.reports-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.report-card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.report-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.report-title {
    font-size: 1rem;
    font-weight: 600;
}

.report-period select {
    font-size: 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 0.25rem 0.5rem;
}

.chart-container {
    height: 15rem;
    padding: 1rem;
}

.chart-container-half {
    width: 50%;
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.chart-wrapper {
    height: 20rem;
    padding: 1rem;
}

.report-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Settings Page */
.settings-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
    gap: 1.5rem;
}

.settings-card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.settings-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 2.5rem;
    height: 1.25rem;
    background-color: var(--gray-300);
    border-radius: 9999px;
    margin-right: 0.75rem;
    transition: var(--transition);
}

.toggle-switch:before {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: white;
    left: 0.125rem;
    top: 0.125rem;
    transition: var(--transition);
}

.toggle-label input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-label input:checked + .toggle-switch {
    background-color: var(--primary-color);
}

.toggle-label input:checked + .toggle-switch:before {
    transform: translateX(1.25rem);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 1rem;
    height: 1rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 20;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 32rem;
    margin: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--gray-500);
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* Consumer Page Styles */
.consumer-nav {
    background-color: white;
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
}

.nav-link {
    color: var(--accent-color);
    font-weight: 500;
}

.consumer-hero {
    background: var(--gradient);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.consumer-hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.consumer-hero p {
    font-size: 1.125rem;
    max-width: 36rem;
    margin: 0 auto;
}

.consumer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.qr-scanner-section {
    flex: 1;
    min-width: 18rem;
}

.complaint-form-section {
    flex: 2;
    min-width: 20rem;
}

.qr-scanner-container {
    margin-top: 1.5rem;
    text-align: center;
}

#qrVideo {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.confirmation-message {
    text-align: center;
    padding: 1.5rem 0;
}

.confirmation-icon {
    font-size: 3rem;
    color: var(--green);
    margin-bottom: 1rem;
}

.tracking-info {
    background-color: var(--gray-100);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1.5rem;
    text-align: left;
}

.tracking-result-section {
    padding: 2rem 0;
}

.tracking-result {
    padding: 1.5rem;
}

.consumer-footer {
    background-color: var(--gray-800);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-logo i {
    margin-right: 0.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--gray-300);
}

.footer-links a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-400);
    font-size: 0.875rem;
}

/* Media Queries */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .chart-container-half {
        width: 100%;
    }

    .reports-container {
        grid-template-columns: 1fr;
    }

    .settings-container {
        grid-template-columns: 1fr;
    }

    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .filter-group select,
    .filter-group input {
        width: 100%;
    }

    .section-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-header-flex .btn {
        width: 100%;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    .form-row {
        flex-direction: column;
    }

    .form-group.half {
        max-width: 100%;
    }

    .modal-content {
        margin: 1rem;
    }

    .consumer-content {
        flex-direction: column;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar.open {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 100;
        width: 80%;
        max-width: 20rem;
    }

    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }
}

/* Timeline for tracking */
.tracking-timeline {
    padding: 1.5rem 0;
    position: relative;
}

.timeline-item {
    padding-left: 2rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item:before {
    content: "";
    width: 1px;
    background-color: var(--gray-300);
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
}

.timeline-item:last-child:before {
    height: 1.5rem;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.5rem;
}

.timeline-icon.green {
    background-color: var(--green);
}

.timeline-icon.yellow {
    background-color: var(--yellow);
}

.timeline-icon.red {
    background-color: var(--red);
}

.timeline-content {
    background-color: var(--gray-100);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.timeline-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.timeline-description {
    font-size: 0.875rem;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.toast {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    max-width: 24rem;
    animation: fadeIn 0.3s ease forwards;
    border-left: 4px solid var(--accent-color);
}

.toast.success {
    border-left-color: var(--green);
}

.toast.error {
    border-left-color: var(--red);
}

.toast.warning {
    border-left-color: var(--yellow);
}

.toast-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.toast-icon.success {
    color: var(--green);
}

.toast-icon.error {
    color: var(--red);
}

.toast-icon.warning {
    color: var(--yellow);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--gray-400);
    cursor: pointer;
    margin-left: 0.5rem;
}

/* Loading indicators */
.loader {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-secondary.btn-loading:after {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid var(--gray-700);
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 10rem;
    background-color: var(--gray-800);
    color: white;
    text-align: center;
    border-radius: var(--radius-md);
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.3s;
    font-size: 0.75rem;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--gray-800) transparent transparent transparent;
}

/* QR Scanner Styles */
.qr-scanner-overlay {
    position: relative;
    width: 100%;
    max-width: 20rem;
    margin: 0 auto;
}

.qr-scanner-frame {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    box-shadow: 0 0 0 5000px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.qr-scanner-line {
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    height: 2px;
    background-color: var(--primary-color);
    z-index: 2;
    animation: scanLine 2s linear infinite;
}

@keyframes scanLine {
    0% {
        top: 5%;
    }
    50% {
        top: 95%;
    }
    100% {
        top: 5%;
    }
}

/* Custom file input */
.file-input-container {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
}

.file-input-label i {
    margin-right: 0.5rem;
}

.file-name {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Progress bar */
.progress-container {
    width: 100%;
    background-color: var(--gray-200);
    border-radius: 9999px;
    height: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* Additional Utilities */
.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.text-sm {
    font-size: 0.875rem;
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.link {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.link:hover {
    color: var(--accent-dark);
}