/* ========================================
   WebSzamolo - Main Stylesheet
   ======================================== */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 0px;
    --topbar-height: 70px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}


/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--gray-900);
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.875rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

/* Layout Structure */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

    .main-content.sidebar-collapsed {
        margin-left: var(--sidebar-collapsed-width);
    }

/* ========================================
   GRID 
   ======================================== */

.cursor-pointer {
    cursor: pointer;
}
input[type="checkbox"][readonly] {
    pointer-events: none;
}

/* ========================================
   SIDEBAR STYLES
   ======================================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: white;
    border-right: 1px solid var(--gray-200);
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
    }

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Sidebar Brand */
.sidebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: white;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Base Brand Logo Styles */
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: var(--border-radius);
    color: var(--gray-600);
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Sidebar Brand Logo */
.sidebar-brand .brand-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto;
}

/* Sidebar Brand Container */
.sidebar-brand .brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-brand .brand-container > div:last-child {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    text-align: center;
}

.brand-logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.brand-text {
    color: var(--gray-600);
    overflow: hidden;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--gray-700);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
    color: var(--gray-500);
}

.sidebar.collapsed .brand-text {
    display: none;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0 0.75rem 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    font-weight: 500;
}

    .nav-link:hover {
        background-color: var(--gray-100);
        color: var(--primary-color);
        text-decoration: none;
    }

    .nav-link.active {
        background-color: var(--primary-color);
        color: white;
        box-shadow: var(--shadow);
    }

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    transition: var(--transition);
}

.nav-item.has-submenu .nav-link[aria-expanded="true"] .submenu-arrow {
    transform: rotate(90deg);
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .submenu-arrow {
    display: none;
}

/* Submenu Styles */
.submenu {
    overflow: hidden;
    transition: var(--transition);
}

.submenu-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.submenu-item {
    margin: 0 0 0.25rem;
}

.submenu-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem 0.5rem 3rem;
    color: var(--gray-500);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 0.875rem;
}

    .submenu-link:hover {
        background-color: var(--gray-100);
        color: var(--primary-color);
        text-decoration: none;
    }

    .submenu-link.active {
        background-color: var(--primary-color);
        color: white;
    }

.submenu-icon {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Navigation Separator */
.nav-separator {
    margin: 1.5rem 0.75rem 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.separator-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    padding: 0 1rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

.footer-info {
    text-align: center;
}

.app-version {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.support-link a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .support-link a:hover {
        color: var(--primary-color);
    }

/* ========================================
   TOP NAVIGATION STYLES
   ======================================== */

.top-navbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

    .sidebar-toggle:hover {
        background-color: var(--gray-100);
        color: var(--primary-color);
    }

.breadcrumb-container {
    margin: 0;
}

.breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--gray-500);
    text-decoration: none;
}

    .breadcrumb-item a:hover {
        color: var(--primary-color);
    }

.breadcrumb-item.active {
    color: var(--gray-700);
    font-weight: 500;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Global Search */
.global-search {
    position: relative;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 300px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition);
    background: var(--gray-50);
}

    .search-input:focus {
        outline: none;
        border-color: var(--primary-color);
        background: white;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

.search-btn {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
}

/* Notifications */
.notification-dropdown {
    position: relative;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

    .notification-btn:hover {
        background-color: var(--gray-100);
        color: var(--primary-color);
    }

.notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.notification-menu {
    width: 380px;
    max-width: 95vw;
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-lg);
    margin-top: 0.5rem;
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .notification-header h6 {
        margin: 0;
        font-weight: 600;
    }

.mark-all-read {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-decoration: none;
}

.notification-item {
    border-bottom: 1px solid var(--gray-100);
}

    .notification-item:last-child {
        border-bottom: none;
    }

    .notification-item .dropdown-item {
        padding: 0.75rem 1rem;
        white-space: normal;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
    }

    .notification-item .d-flex {
        gap: 0.5rem;
        align-items: center;
    }

    .notification-item .d-flex > * {
        min-width: 0;
    }

    .notification-item .notification-icon {
        flex-shrink: 0;
        width: 20px;
    }

    .notification-item.unread {
        background-color: var(--primary-color);
        background-color: rgba(37, 99, 235, 0.05);
    }

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.notification-title {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.875rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.notification-description {
    color: var(--gray-600);
    font-size: 0.8125rem;
    line-height: 1.5;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    max-width: 100%;
}

.notification-meta {
    margin-top: 0.25rem;
}

.notification-text {
    color: var(--gray-600);
    font-size: 0.8125rem;
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
}

.notification-time {
    color: var(--gray-400);
    font-size: 0.75rem;
}

.acknowledge-notification {
    min-width: 32px;
    min-height: 32px;
    padding: 0.375rem;
    font-size: 0.875rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.acknowledge-notification:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.notification-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.notification-footer {
    padding: 0.75rem 1rem;
    text-align: center;
    border-top: 1px solid var(--gray-200);
}

.view-all-notifications {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

/* User Menu */
.user-dropdown {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

    .user-menu-btn:hover {
        background-color: var(--gray-100);
    }

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-info {
    text-align: left;
}

.user-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.875rem;
    line-height: 1.2;
}

.user-role {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.user-menu {
    width: 250px;
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-lg);
}

.user-menu-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.user-details .user-name {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.user-details .user-email {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.user-details .user-roles {
    color: var(--gray-600);
}

.user-menu .dropdown-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-700);
    transition: var(--transition);
}

    .user-menu .dropdown-item:hover {
        background-color: var(--gray-50);
        color: var(--primary-color);
    }

    .user-menu .dropdown-item i {
        width: 16px;
        text-align: center;
        color: var(--gray-400);
    }

.logout-form {
    margin: 0;
}

.logout-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    color: var(--danger-color);
}

    .logout-btn:hover {
        background-color: rgba(239, 68, 68, 0.1);
        color: var(--danger-color);
    }

/* ========================================
   PAGE CONTENT STYLES
   ======================================== */

.page-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.page-header {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header-content {
    flex: 1;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ========================================
   VIEW MESSAGES STYLES
   ======================================== */

.view-messages-container {
    margin-bottom: 1rem;
}

.view-message {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 0.75rem;
    border-left: 4px solid;
}

    .view-message.alert-success {
        border-left-color: var(--success-color);
        background-color: rgba(16, 185, 129, 0.1);
        color: var(--success-color);
    }

    .view-message.alert-danger {
        border-left-color: var(--danger-color);
        background-color: rgba(239, 68, 68, 0.1);
        color: var(--danger-color);
    }

    .view-message.alert-warning {
        border-left-color: var(--warning-color);
        background-color: rgba(245, 158, 11, 0.1);
        color: var(--warning-color);
    }

    .view-message.alert-info {
        border-left-color: var(--info-color);
        background-color: rgba(6, 182, 212, 0.1);
        color: var(--info-color);
    }

/* Toast Notifications */
.toast-container {
    z-index: 2000;
}

.toast {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
}

/* ========================================
   LOADING OVERLAY
   ======================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

    .loading-overlay.show {
        display: flex;
    }

.loading-spinner {
    text-align: center;
}

.loading-text {
    margin-top: 1rem;
    color: var(--gray-600);
    font-weight: 500;
}

.mobile-tile {
    display: none;
}
/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet Styles */
@media (max-width: 992px) {
    .search-input {
        width: 200px;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .page-actions {
        justify-content: center;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

        .sidebar.show {
            transform: translateX(0);
        }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .global-search {
        display: none;
    }

    .user-info {
        display: none;
    }

    .page-content {
        padding: 1rem;
    }

    .page-header {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .notification-menu {
        width: 280px;
    }

    .user-menu {
        width: 220px;
    }
    /* Mobile Grid Card Styling */
    tr {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0.2rem 1rem;
        background: white !important;
        margin: 0 0 0.75rem 0;
        padding: 0.625rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        border: 1px solid var(--gray-200) !important;
        border-radius: var(--border-radius);
        transition: var(--transition);
    }

    tr:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        border-color: var(--gray-300) !important;
    }

    tr > td {
        padding: 0.2rem 0 !important;
        border: none !important;
        --bs-table-accent-bg: transparent;
    }

    /* Elválasztó vonal minden mező után (kivéve az utolsó kettő előtt) */
    tr > td.mobile-value:not(:nth-last-child(2)) {
        border-bottom: 1px solid var(--gray-100) !important;
        padding-bottom: 0.3rem !important;
        margin-bottom: 0.1rem;
    }

    tr > td.mobile-tile:has(+ td.mobile-value:nth-last-child(2)) {
        border-bottom: 1px solid var(--gray-100) !important;
        padding-bottom: 0.3rem !important;
        margin-bottom: 0.1rem;
    }

    /* Gombok szekció - teljes szélesség, középre rendezve */
    tr > td:last-child {
        grid-column: 1 / -1;
        padding-top: 0.5rem !important;
        margin-top: 0.2rem;
        border-top: 1px solid var(--gray-200) !important;
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .mobile-tile {
        display: flex !important;
        align-items: center;
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--gray-600);
        text-transform: uppercase;
        letter-spacing: 0.025em;
        line-height: 1.1;
    }

    .mobile-value {
        display: flex !important;
        align-items: center;
        font-size: 0.875rem;
        color: var(--gray-900);
        font-weight: 500;
        line-height: 1.1;
        word-break: break-word;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
        white-space: nowrap;
    }

    .btn-sm .fas {
        font-size: 0.7rem;
    }

    .table-striped > tbody > tr:nth-of-type(odd) {
        --bs-table-accent-bg: var(--bs-white);
    }

    thead {
        display: none;
    }

    .table-h-fixed {
        max-height: 100% !important;
    }

    .w-sm-100 {
        width: 100%;
    }

    .link-list-item {
        display: block;
    }



}

/* Small Mobile Styles */
@media (max-width: 576px) {
    .top-navbar {
        padding: 0 1rem;
    }

    .navbar-right {
        gap: 0.5rem;
    }

    .notification-menu {
        width: 260px;
    }

    .user-menu {
        width: 200px;
    }
}
/* ========================================
   GRID ACTION BUTTONS
   ======================================== */

/* Grid table styling with rounded design */
.table-responsive {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.table {
    margin-bottom: 0;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.table td, 
.table th {
    vertical-align: middle;
    padding: 1rem 0.75rem;
    border: none;
}

.table thead th {
    vertical-align: middle;
    background-color: #f8f9fa;
    color: var(--gray-600);
    font-weight: normal;
    text-align: center;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    border: none;
    border-bottom: 2px solid #dee2e6;
    position: relative;
}

.table thead th:first-child {
    border-top-left-radius: var(--border-radius-lg);
}

.table thead th:last-child {
    border-top-right-radius: var(--border-radius-lg);
}

.table tbody td {
    vertical-align: middle;
    border-top: 1px solid var(--gray-100);
    background-color: white;
}

/* Sort icons styling in header */
.table thead th .sort-icon {
    color: var(--gray-500);
    transition: color 0.2s ease;
}

.table thead th .sort-icon:hover {
    color: var(--primary-color);
}

.btn-sm {
    transition: all 0.2s ease-in-out;
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-danger:hover {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

/* Grid table improvements */
.table-hover tbody tr {
    transition: background-color 0.2s ease-in-out;
}

.table-hover tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.08);
    box-shadow: inset 3px 0 0 var(--primary-color);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--gray-50);
}

/* Round bottom corners of last row */
.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--border-radius-lg);
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--border-radius-lg);
}

/* Empty state styling */
.grid-d-empty,
.text-center:has(p) {
    background-color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    padding: 2rem;
    margin: 1rem 0;
}

/* Better spacing and alignment for table content */
.table tbody td {
    line-height: 1.5;
    min-height: 3rem;
}

/* Align text content properly */
.table tbody td:not(:last-child) {
    text-align: left;
}

.table tbody td:last-child {
    text-align: center;
    white-space: nowrap;
}

/* Improve checkbox styling in tables */
.table input[type="checkbox"] {
    transform: scale(1.2);
    margin: 0;
}

/* Mobile table improvements - Default styles (overridden in mobile view) */
.mobile-tile {
    display: none;
}

.mobile-value {
    display: table-cell;
}

/* ========================================
   LOGIN PAGE STYLES
   ======================================== */

/* Login container and layout */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.02)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
    pointer-events: none;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem 2.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Login header */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Login Page Brand Logo */
.login-header .brand-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    color: white;
}

.brand-logo i {
    font-size: 2rem;
    color: white;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Form styles */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.input-group {
    position: relative;
}

.input-group-text {
    background: var(--gray-50);
    border: 1px solid var(--gray-300);
    color: var(--gray-500);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.login-form .form-control {
    border: 1px solid var(--gray-300);
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.login-form .form-control:focus + .password-toggle {
    border-color: var(--primary-color);
}

.login-form .input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary-color);
}

/* Password toggle button */
.password-toggle {
    border: 1px solid var(--gray-300);
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    background: var(--gray-50);
    color: var(--gray-500);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Remember me checkbox */
.form-check {
    margin-bottom: 2rem;
}

.form-check-input {
    border-radius: 4px;
    border: 2px solid var(--gray-300);
    margin-top: 0.125rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

/* Login button */
.login-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: var(--border-radius);
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    margin-bottom: 1.5rem;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.login-btn:active {
    transform: translateY(0);
}

/* Login links */
.login-links {
    text-align: center;
    margin-top: 1.5rem;
}

.forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Error messages */
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.text-danger {
    color: var(--danger-color) !important;
    font-size: 0.75rem;
    margin-top: 0.25rem;
/*    display: block;
*/}

/* Loading animation for login button */
.login-btn.loading {
    position: relative;
    color: transparent;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-success {
    background-color: var(--success-color);
}

.status-warning {
    background-color: var(--warning-color);
}

.status-danger {
    background-color: var(--danger-color);
}

.status-info {
    background-color: var(--info-color);
}

/* Priority Classes */
.priority-high {
    color: var(--danger-color);
}

.priority-medium {
    color: var(--warning-color);
}

.priority-low {
    color: var(--success-color);
}

/* Text Utilities */
.text-muted {
    color: var(--gray-500) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

/* Background Utilities */
.bg-light-primary {
    background-color: rgba(37, 99, 235, 0.1) !important;
}

.bg-light-success {
    background-color: rgba(16, 185, 129, 0.1) !important;
}

.bg-light-warning {
    background-color: rgba(245, 158, 11, 0.1) !important;
}

.bg-light-danger {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Custom Bootstrap Overrides */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover {
        background-color: var(--primary-dark);
        border-color: var(--primary-dark);
    }

.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.form-control {
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-300);
    transition: var(--transition);
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
    }

.table {
    border-radius: var(--border-radius);
    overflow: hidden;
}

    .table th {
        background-color: var(--gray-50);
        border-bottom: 1px solid var(--gray-200);
        font-weight: 600;
        color: var(--gray-700);
    }

/* ========================================
   LOGIN PAGE STYLES
   ======================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 2rem;
}

.login-wrapper {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

.login-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem 2.5rem;
    animation: fadeIn 0.5s ease-out;
    max-width: 100%;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* This is now handled by the specific .login-header .brand-logo above */
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-form .form-group {
    margin-bottom: 0;
}

.login-form .form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.login-form .input-group {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.login-form .input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.login-form .input-group-text {
    background: var(--gray-50);
    border: none;
    color: var(--gray-500);
    padding: 0.75rem 1rem;
}

.login-form .form-control {
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.login-form .form-control:focus {
    box-shadow: none;
    border-color: transparent;
}

.login-form .alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    border-left: 4px solid var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.login-form .alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border-left-color: var(--danger-color);
}

.login-form .alert ul {
    margin: 0;
    padding-left: 1.25rem;
}

.login-form .alert li {
    margin-bottom: 0.25rem;
}

.login-form .alert li:last-child {
    margin-bottom: 0;
}

.password-toggle {
    border: none;
    background: none;
    color: var(--gray-500);
    padding: 0.75rem 1rem;
}

.password-toggle:hover {
    color: var(--primary-color);
    background: none;
    border-color: transparent;
}

.password-toggle:focus {
    box-shadow: none;
    border-color: transparent;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.form-check-input {
    margin: 0;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0;
}

.login-btn {
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
}

.login-links {
    text-align: center;
}

.forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.forgot-password-link:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.divider {
    position: relative;
    text-align: center;
    margin: 1rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
}

.divider-text {
    background: white;
    padding: 0 1rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    position: relative;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    font-weight: 500;
    transition: var(--transition);
}

.btn-google:hover {
    background-color: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-800);
}

.google-icon {
    flex-shrink: 0;
}

.register-link {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-left: 0.25rem;
}

.register-link a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

/* Login Page Responsive */
@media (min-width: 768px) {
    .login-container {
        padding: 2rem;
    }

    .login-wrapper {
        max-width: 620px;
    }

    .login-card {
        padding: 3rem;
    }
}

@media (max-width: 767px) {
    .login-container {
        padding: 1rem;
        height: 100vh;
        overflow-y: auto;
    }

    .login-wrapper {
        max-width: 100%;
        margin: auto 0;
    }

    .login-card {
        padding: 1.5rem 1.25rem;
    }

    .login-header {
        margin-bottom: 1.5rem;
    }

    .login-form {
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 0.75rem;
        min-height: 100vh;
        height: 100vh;
    }

    .login-card {
        padding: 1.25rem 1rem;
    }

    .login-title {
        font-size: 1.375rem;
    }

    .login-subtitle {
        font-size: 0.8125rem;
    }

    .login-header {
        margin-bottom: 1.25rem;
    }

    .login-header .brand-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

    .login-header .brand-logo img {
        width: 45px;
        height: 45px;
    }

    .login-form {
        gap: 0.875rem;
    }

    .login-btn {
        margin-bottom: 1rem;
    }
}

@media (max-width: 400px) {
    .login-container {
        padding: 0.5rem;
    }

    .login-card {
        padding: 1rem 0.875rem;
    }

    .login-title {
        font-size: 1.25rem;
    }

    .login-header {
        margin-bottom: 1rem;
    }

    .login-header .brand-logo {
        width: 50px;
        height: 50px;
        margin-bottom: 0.75rem;
    }

    .login-header .brand-logo img {
        width: 40px;
        height: 40px;
    }

    .login-form {
        gap: 0.75rem;
    }

    .form-group {
        margin-bottom: 0;
    }

    .login-btn {
        margin-bottom: 0.75rem;
        padding: 0.75rem 1.25rem;
    }
}

/* Loading Spinner Styles */
.lds-spinner {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.lds-spinner div {
    transform-origin: 40px 40px;
    animation: lds-spinner 1.2s linear infinite;
}

.lds-spinner div:after {
    content: " ";
    display: block;
    position: absolute;
    top: 3px;
    left: 37px;
    width: 6px;
    height: 18px;
    border-radius: 20%;
    background: var(--primary-color);
}

.lds-spinner div:nth-child(1) {
    transform: rotate(0deg);
    animation-delay: -1.1s;
}

.lds-spinner div:nth-child(2) {
    transform: rotate(30deg);
    animation-delay: -1s;
}

.lds-spinner div:nth-child(3) {
    transform: rotate(60deg);
    animation-delay: -0.9s;
}

.lds-spinner div:nth-child(4) {
    transform: rotate(90deg);
    animation-delay: -0.8s;
}

.lds-spinner div:nth-child(5) {
    transform: rotate(120deg);
    animation-delay: -0.7s;
}

.lds-spinner div:nth-child(6) {
    transform: rotate(150deg);
    animation-delay: -0.6s;
}

.lds-spinner div:nth-child(7) {
    transform: rotate(180deg);
    animation-delay: -0.5s;
}

.lds-spinner div:nth-child(8) {
    transform: rotate(210deg);
    animation-delay: -0.4s;
}

.lds-spinner div:nth-child(9) {
    transform: rotate(240deg);
    animation-delay: -0.3s;
}

.lds-spinner div:nth-child(10) {
    transform: rotate(270deg);
    animation-delay: -0.2s;
}

.lds-spinner div:nth-child(11) {
    transform: rotate(300deg);
    animation-delay: -0.1s;
}

.lds-spinner div:nth-child(12) {
    transform: rotate(330deg);
    animation-delay: 0s;
}

@keyframes lds-spinner {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Sticky Footer for Create/Edit Forms */
.sticky-form-footer {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 1rem 0;
    z-index: 1030;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.95);
}

.sticky-form-footer .container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.sticky-form-footer .row {
    margin: 0;
}

.sticky-form-footer .col-12 {
    padding: 0;
}

/* Adjustments for collapsed sidebar */
.sidebar-collapsed .sticky-form-footer {
    left: var(--sidebar-collapsed-width);
}

/* Add padding to page content to prevent overlap */
.page-content.has-sticky-footer {
    padding-bottom: 120px;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .sticky-form-footer .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .sticky-form-footer {
        padding: 0.75rem 0;
    }
    
    .sticky-form-footer .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .sticky-form-footer .btn {
        width: 100%;
        justify-content: center;
    }
    
    .page-content.has-sticky-footer {
        padding-bottom: 140px;
    }
}

/* Extra small screens */
@media (max-width: 576px) {
    .sticky-form-footer {
        padding: 0.5rem 0;
    }
    
    .page-content.has-sticky-footer {
        padding-bottom: 130px;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .top-navbar,
    .view-messages-container,
    .loading-overlay,
    .sticky-form-footer {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .page-content {
        padding: 0 !important;
    }
}

/* ========================================
   EDITABLE FIELD STYLES - Inline Edit
   ======================================== */

/* Editable Field Container */
.editable-field {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    background-color: var(--gray-50);
    min-height: 48px;
    transition: var(--transition);
}

.editable-field:hover {
    background-color: white;
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

/* Field Value Display */
.editable-field .field-value {
    flex: 1;
    color: var(--gray-700);
    font-weight: 500;
}

/* Edit Button in Normal Mode */
.editable-field .edit-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.editable-field:hover .edit-btn {
    opacity: 1;
}

/* Editing Mode */
.editable-field.editing {
    background-color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.editable-field.editing input {
    flex: 1;
}

/* Save/Cancel Buttons in Edit Mode */
.editable-field .save-btn,
.editable-field .cancel-btn {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

/* Input Styling in Edit Mode */
.editable-field input.form-control-sm {
    border: 1px solid var(--gray-300);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: var(--transition);
}

.editable-field input.form-control-sm:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
    outline: none;
}
