/**
 * ÁTR Beragadt Betegek - Custom Styles
 * Matching the provided screenshot design
 */

:root {
    --sidebar-bg: #1a9b7f;
    --sidebar-hover: #168f73;
    --sidebar-active: #137763;
    --sidebar-width: 280px;
    --header-height: 65px;
    --primary-color: #1a9b7f;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f7fafc;
    color: var(--text-dark);
    overflow-x: hidden;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* ================================
   Sidebar Styles
   ================================ */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #168f73 100%);
    color: white;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.logo-text h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.logo-text small {
    font-size: 0.75rem;
    opacity: 0.8;
    display: block;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav {
    padding: 0 0.75rem;
}

.sidebar-nav .nav-item {
    margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.sidebar-nav .nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(2px);
}

.sidebar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 500;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
}

/* ================================
   Main Content Area
   ================================ */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ================================
   Top Header
   ================================ */

.top-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

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

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
}

.user-info i {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.user-name {
    font-weight: 500;
    font-size: 0.95rem;
}

/* ================================
   Content Area
   ================================ */

.content-area {
    flex: 1;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ================================
   Cards
   ================================ */

.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    background: white;
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
    border-radius: 12px 12px 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* ================================
   Forms
   ================================ */

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 155, 127, 0.1);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #f7fafc;
    color: var(--text-muted);
}

.form-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Select2 custom styling */
.select2-container--bootstrap-5 .select2-selection {
    border-radius: 8px !important;
    min-height: 42px !important;
}

/* ================================
   Buttons
   ================================ */

.btn {
    border-radius: 8px;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--sidebar-hover);
    border-color: var(--sidebar-hover);
}

.btn-secondary {
    background: #718096;
    border-color: #718096;
}

.btn-success {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
}

/* ================================
   Tables
   ================================ */

.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background-color: #f7fafc;
}

.table thead th {
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

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

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* ================================
   Badges
   ================================ */

.badge {
    padding: 0.4rem 0.75rem;
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* ================================
   Pagination
   ================================ */

.pagination {
    margin-top: 1.5rem;
}

.page-link {
    border-radius: 6px;
    margin: 0 0.2rem;
    border-color: var(--border-color);
    color: var(--text-dark);
}

.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ================================
   Footer
   ================================ */

.footer {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    background: white;
    margin-top: auto;
}

/* ================================
   Breadcrumb
   ================================ */

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-dark);
}

/* ================================
   Alerts
   ================================ */

.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
}

/* ================================
   Login Page
   ================================ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a9b7f 0%, #168f73 100%);
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

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

.login-logo i {
    font-size: 4rem;
    color: var(--primary-color);
}

/* ================================
   Responsive
   ================================ */

@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    .sidebar.show {
        margin-left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .content-area {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }
}

/* ================================
   Utilities
   ================================ */

.text-muted {
    color: var(--text-muted) !important;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.mt-4 {
    margin-top: 1.5rem !important;
}
