/* Light Teal Theme for 409 Backend Webapp */
/* Color Palette:
   Primary teal: #42a9ac
   Light teal: #e8f8f8
   Medium teal: #52aaa5
   Dark teal: #1a5557
   Light grey background: #f8f9fa
   Dark text: #212529
*/

/* Import Manrope font */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap');

/* Root variables for theme */
:root {
    --bs-body-bg: #f8f9fa;
    --bs-body-color: #212529;
    --bs-primary: #42a9ac;
    --bs-primary-rgb: 66, 169, 172;
    --bs-secondary: #52aaa5;
    --bs-light: #e8f8f8;
    --bs-dark: #1a5557;
    --bs-border-color: #dee2e6;
    --bs-border-radius: 0.375rem;
}

/* Apply theme to html element */
html {
    font-family: 'Manrope', sans-serif !important;
}

body {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    font-family: 'Manrope', sans-serif !important;
}

/* Main content area background */
.main-content {
    background-color: #f8f9fa !important;
}

/* Container backgrounds */
.container,
.container-fluid {
    background-color: transparent !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #212529;
}

/* Cards and containers */
.card {
    background-color: #ffffff;
    border-color: #dee2e6;
    color: #212529;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header {
    background-color: #e8f8f8;
    border-bottom-color: #dee2e6;
    color: #1a5557 !important;
    font-weight: 600;
}

.card-body {
    color: #212529 !important;
}

.card-footer {
    background-color: #f8f9fa;
    border-top-color: #dee2e6;
}

.card-title {
    color: #1a5557 !important;
}

.card-text {
    color: #495057 !important;
}

/* Buttons */
.btn-primary {
    background-color: #42a9ac;
    border-color: #42a9ac;
    color: #ffffff;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #389ea1;
    border-color: #389ea1;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 169, 172, 0.3);
}

.btn-light {
    background-color: #e8f8f8;
    border-color: #e8f8f8;
    color: #1a5557;
    transition: all 0.3s ease;
}

.btn-light:hover,
.btn-light:focus {
    background-color: #d0e8e8;
    border-color: #d0e8e8;
    color: #1a5557;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    transition: all 0.3s ease;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #1a5557 0%, #42a9ac 100%) !important;
    border-bottom: 2px solid #52aaa5;
}

.navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffffff !important;
}

.nav-link.active {
    color: #ffffff !important;
    font-weight: 600;
}

/* Dropdown in navbar */
.navbar .dropdown-menu {
    border-color: #42a9ac;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Sidebar */
.sidebar {
    /* Use solid color - gradient handled in base.html */
    background: var(--sidebar-bg-color, #1a5557);
    border-right-color: #dee2e6;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link {
    color: #ffffff;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 0.375rem;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.2);
}

.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-radius: 0.375rem;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.2);
    border-left: 3px solid #ffffff;
}

/* Tables */
.table {
    color: #212529;
    border-color: #dee2e6;
}

.table thead th {
    background-color: #e8f8f8;
    border-color: #dee2e6;
    color: #1a5557;
    font-weight: 600;
}

.table tbody tr {
    border-color: #dee2e6;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #f8f9fa;
}

.table-hover > tbody > tr:hover > * {
    background-color: #e8f8f8;
}

/* Forms */
.form-control,
.form-select {
    background-color: #ffffff;
    border-color: #ced4da;
    color: #212529;
}

.form-control::placeholder {
    color: #6c757d;
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff;
    border-color: #42a9ac;
    color: #212529;
    box-shadow: 0 0 0 0.25rem rgba(66, 169, 172, 0.25);
}

.form-label {
    color: #495057;
    font-weight: 600;
}

/* Badges */
.badge {
    transition: all 0.3s ease;
}

.badge.bg-primary {
    background-color: #42a9ac !important;
    color: #ffffff !important;
}

.badge.bg-success {
    background-color: #198754 !important;
    color: #ffffff !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000000 !important;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #000000 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

/* Alerts */
.alert {
    border-radius: 0.375rem;
    border-color: #dee2e6;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-primary {
    background-color: #d1f0f1;
    border-color: #42a9ac;
    color: #1a5557;
}

/* Modals */
.modal-content {
    background-color: #ffffff;
    border-color: #dee2e6;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: #e8f8f8;
    border-bottom-color: #dee2e6;
}

.modal-footer {
    border-top-color: #dee2e6;
}

/* Dropdowns */
.dropdown-menu {
    background-color: #ffffff;
    border-color: #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    color: #212529;
    transition: all 0.3s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #e8f8f8;
    color: #1a5557;
}

/* Pagination */
.pagination .page-link {
    background-color: #ffffff;
    border-color: #dee2e6;
    color: #42a9ac;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #e8f8f8;
    border-color: #42a9ac;
    color: #1a5557;
}

.pagination .page-item.active .page-link {
    background-color: #42a9ac;
    border-color: #42a9ac;
}

/* Progress bars */
.progress {
    background-color: #e9ecef;
}

.progress-bar {
    background-color: #42a9ac;
}

/* Links */
a {
    color: #42a9ac;
    transition: color 0.3s ease;
}

a:hover {
    color: #389ea1;
}

/* List groups */
.list-group-item {
    background-color: #ffffff;
    border-color: #dee2e6;
    color: #212529;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* Text colors */
.text-muted {
    color: #6c757d !important;
}

.text-primary {
    color: #42a9ac !important;
}

.text-secondary {
    color: #6c757d !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f8f9fa;
}

::-webkit-scrollbar-thumb {
    background: #42a9ac;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #389ea1;
}

/* Theme toggle button */
.theme-toggle-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
}

.theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Smooth transitions for all interactive elements */
button,
a,
.btn,
.nav-link,
.dropdown-item {
    transition: all 0.3s ease;
}
