﻿:root {
    --tmt-red: #dd1621;
    --tmt-blue: #035697;
    --tmt-light-bg: #f8f9fa;
    --tmt-dark-bg: #212529;
    --tmt-border-color: #dee2e6;
    --tmt-sidebar-width: 260px;
    --tmt-sidebar-collapsed-width: 70px;
    --tmt-header-height: 60px;
    --tmt-transition-speed: 0.3s;
    --tmt-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --tmt-card-border-radius: 0.5rem;
}

/* Base Styles */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--tmt-light-bg);
    color: #333;
    overflow-x: hidden;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--tmt-sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #fff;
    border-right: 1px solid var(--tmt-border-color);
    z-index: 1030;
    transition: all var(--tmt-transition-speed) ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--tmt-box-shadow);
}

    .sidebar.collapsed {
        width: var(--tmt-sidebar-collapsed-width);
    }

.sidebar-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--tmt-border-color);
    height: var(--tmt-header-height);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 30px;
    width: auto;
}

.logo-text {
    font-weight: 600;
    font-size: 1.2rem;
    margin-left: 0.5rem;
    color: var(--tmt-blue);
    transition: opacity var(--tmt-transition-speed) ease;
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.2rem;
    cursor: pointer;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-nav {
    width: 100%;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

    .nav-link:hover,
    .nav-link:focus {
        color: var(--tmt-blue);
        background-color: rgba(3, 86, 151, 0.05);
    }

    .nav-link.active {
        color: var(--tmt-blue);
        background-color: rgba(3, 86, 151, 0.1);
        border-left-color: var(--tmt-blue);
    }

    .nav-link i {
        font-size: 1.2rem;
        margin-right: 0.75rem;
        width: 20px;
        text-align: center;
    }

.sidebar.collapsed .nav-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.nav-submenu {
    list-style: none;
    padding-left: 3.25rem;
}

    .nav-submenu .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

.dropdown-toggle::after {
    margin-left: auto;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--tmt-border-color);
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--tmt-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

    .user-avatar i {
        font-size: 1.5rem;
    }

.user-details {
    overflow: hidden;
    transition: opacity var(--tmt-transition-speed) ease;
}

.sidebar.collapsed .user-details {
    opacity: 0;
    width: 0;
}

.user-name {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    margin: 0;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: var(--tmt-sidebar-width);
    transition: margin-left var(--tmt-transition-speed) ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--tmt-sidebar-collapsed-width);
}

/* Header Styles */
.header {
    height: var(--tmt-header-height);
    background-color: #fff;
    border-bottom: 1px solid var(--tmt-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: var(--tmt-box-shadow);
}

.header-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
}

.search-container,
.notifications-container,
.user-container {
    margin-left: 1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-icon:hover,
    .btn-icon:focus {
        background-color: rgba(108, 117, 125, 0.1);
        color: #495057;
    }

.badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(25%, -25%);
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
}

/* Notification Dropdown Styles */
.notification-dropdown {
    width: 320px;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--tmt-border-color);
}

.notification-item {
    display: flex;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.notification-details {
    flex: 1;
}

.notification-title {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-text {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: #6c757d;
}

.notification-time {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #adb5bd;
}

/* Page Content Styles */
.page-content {
    flex: 1;
    padding: 1.5rem;
    overflow-x: hidden;
}

/* Footer Styles */
.footer {
    padding: 1rem 1.5rem;
    background-color: #fff;
    border-top: 1px solid var(--tmt-border-color);
    font-size: 0.875rem;
    color: #6c757d;
}

    .footer a {
        color: var(--tmt-blue);
        text-decoration: none;
    }

        .footer a:hover {
            text-decoration: underline;
        }

/* Card Styles */
.card {
    border: none;
    border-radius: var(--tmt-card-border-radius);
    box-shadow: var(--tmt-box-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1.5rem;
}

    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    }

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--tmt-border-color);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
}

/* Stats Card Styles */
.stats-card {
    display: flex;
    align-items: center;
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
}

.stats-info {
    flex: 1;
}

.stats-title {
    margin: 0;
    font-size: 0.875rem;
    color: #6c757d;
}

.stats-value {
    margin: 0.25rem 0 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.stats-change {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

    .stats-change i {
        margin-right: 0.25rem;
    }

    .stats-change.positive {
        color: #28a745;
    }

    .stats-change.negative {
        color: #dc3545;
    }

/* Table Styles */
.table-responsive {
    border-radius: var(--tmt-card-border-radius);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

    .table th {
        font-weight: 600;
        background-color: #f8f9fa;
        border-top: none;
    }

    .table td {
        vertical-align: middle;
    }

/* Chart Styles */
.chart-container {
    position: relative;
    height: 300px;
}

/* Offcanvas Styles */
.offcanvas-custom {
    width: 50%;
}
.offcanvas-header {
    background-color: var(--tmt-blue);
    color: white;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Notification Container Styles */
.notification-container {
    position: fixed;
    top: calc(var(--tmt-header-height) + 1rem);
    right: 1rem;
    z-index: 1050;
    max-width: 350px;
}

/* Autocomplete Dropdown Styles */
.autocomplete-dropdown {
    position: absolute;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid var(--tmt-border-color);
    border-radius: 0.25rem;
    z-index: 1000;
    display: none;
    box-shadow: var(--tmt-box-shadow);
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

    .autocomplete-item:hover {
        background-color: rgba(3, 86, 151, 0.05);
    }

/* Responsive Styles */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.show {
            transform: translateX(0);
        }

    .main-content {
        margin-left: 0 !important;
    }

    .sidebar-toggle {
        display: flex;
    }
}

@media (max-width: 767.98px) {
    .page-content {
        padding: 1rem;
    }

    .header {
        padding: 0 1rem;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .stats-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .stats-value {
        font-size: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .notification-dropdown {
        width: 280px;
    }
}
