/* CSS Variables */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;

    /* Mobile-specific variables */
    --touch-target-min: 44px;
    --mobile-padding: 16px;
    --mobile-gap: 12px;
    --bottom-nav-height: 64px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Mobile Utility Classes */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: block;
}

/* Bottom Tab Navigation - Hidden by default on desktop */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    display: none;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    min-width: 64px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-item:active {
    opacity: 0.7;
}

/* Mobile Menu Overlay - Hidden by default */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.show {
    display: block;
    opacity: 1;
}

.mobile-menu-panel {
    position: fixed;
    bottom: var(--bottom-nav-height);
    left: 0;
    right: 0;
    background: var(--surface-color);
    border-radius: 16px 16px 0 0;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    max-height: 60vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.mobile-menu-overlay.show .mobile-menu-panel {
    transform: translateY(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 18px;
}

.mobile-menu-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.mobile-menu-item:active {
    background: var(--background-color);
}

.mobile-menu-item svg {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.mobile-menu-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.mobile-menu-item.active svg {
    color: var(--primary-color);
}

/* Show mobile elements only on mobile */
@media (max-width: 767px) {
    .mobile-only {
        display: flex !important;
    }

    .desktop-only {
        display: none !important;
    }

    .bottom-nav {
        display: flex;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--background-color);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-toggle {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

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

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

.btn-block {
    width: 100%;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    margin-bottom: 20px;
    color: white;
}

.login-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-form {
    margin-bottom: 20px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.error-message {
    background-color: #fef2f2;
    color: var(--danger-color);
    padding: 12px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-top: 15px;
    border: 1px solid #fecaca;
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
}

/* Landing Page */
.landing-page {
    background-color: var(--surface-color);
}

.navbar {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.features {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
    background-color: var(--background-color);
}

.features h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--surface-color);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    color: white;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

.about {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px;
    text-align: center;
}

.about h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.about p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer {
    background-color: var(--text-primary);
    color: white;
    padding: 30px 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

/* Dashboard Page */
.dashboard-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard-nav {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-nav .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    margin: 0;
    padding: 0 20px;
}

.dashboard-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    flex-shrink: 0;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.user-info {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: 600;
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.dashboard-main {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 250px;
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-menu li a:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

.sidebar-menu li.active a {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.dashboard-content {
    flex: 1;
    padding: 30px;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.dashboard-header p {
    color: var(--text-secondary);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--surface-color);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    color: white;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.dashboard-section {
    background: var(--surface-color);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.dashboard-section h2 {
    font-size: 18px;
    margin-bottom: 20px;
}

.quick-actions {
    display: flex;
    gap: 10px;
}

.activity-list {
    min-height: 100px;
}

.empty-state {
    color: var(--text-secondary);
    text-align: center;
    padding: 30px;
}

/* Submenu styles */
.has-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submenu-arrow {
    transition: transform 0.2s;
}

.has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(0, 0, 0, 0.02);
}

.has-submenu.open .submenu {
    max-height: 200px;
}

.submenu li a {
    padding: 8px 20px;
    font-size: 13px;
}

.submenu li a.active {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
}

/* Table styles */
.table-container {
    overflow-x: auto;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--surface-color);
}

.data-table thead {
    background-color: var(--background-color);
    border-bottom: 2px solid var(--border-color);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background-color: var(--background-color);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.status-active {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.status-inactive {
    background-color: rgba(100, 116, 139, 0.1);
    color: var(--secondary-color);
}

.status-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-pending {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

/* Status select in table */
.status-select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    background-color: var(--surface-color);
    cursor: pointer;
    min-width: 120px;
}

.status-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Form styles */
.form-container {
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    background-color: var(--surface-color);
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.success-message {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
    padding: 12px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-top: 15px;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Stat icon variations */
.stat-icon.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #16a34a 100%);
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
}

.stat-icon.danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
}

/* Company link */
.company-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.company-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Header with back button */
.header-with-back {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Stats placeholder */
.stats-placeholder {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 30px;
    background-color: var(--background-color);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
}

.stat-placeholder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
}

.stat-placeholder-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.stat-placeholder-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-secondary);
}

.stat-placeholder-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.placeholder-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 15px;
    font-style: italic;
}

/* Info grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.info-item span {
    font-size: 16px;
    color: var(--text-primary);
}

/* Section header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Role badge */
.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.modal-content.wide {
    max-width: 900px;
}

.modal-content .modal-header {
    padding: 20px 30px;
}

.modal-content form {
    padding: 0 30px 30px 30px;
}

.modal-content .modal-actions {
    padding-top: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-primary);
}

#createUserForm {
    padding: 25px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-panel {
    animation: fadeIn 0.3s ease;
}

/* Tasks Page Styles */
.task-form {
    max-width: 800px;
}

.task-filters {
    display: flex;
    gap: 8px;
}

.task-filters .btn-outline.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-card {
    background: var(--surface-color);
    border-radius: var(--radius);
    border-left: 4px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: visible;
}

.task-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.task-card:hover .task-delete-btn {
    display: flex !important;
    animation: fadeInDeleteBtn 0.2s ease-in-out;
}

@keyframes fadeInDeleteBtn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 0.8;
        transform: translateX(0);
    }
}

.task-card .task-delete-btn:hover {
    opacity: 1 !important;
    background: #c82333 !important;
}

.task-delete-btn {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.task-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.task-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.task-urgency-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-urgent .task-urgency-badge {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.task-high .task-urgency-badge {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.task-medium .task-urgency-badge {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.task-low .task-urgency-badge {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.task-actions {
    display: flex;
    gap: 8px;
}

.task-card-body {
    padding: 15px 20px;
}

.task-description {
    margin: 0 0 15px 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.task-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Calendar Styles */
.calendar-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.calendar-title {
    font-size: 18px;
    font-weight: 600;
    min-width: 150px;
    text-align: center;
}

.calendar-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--background-color);
    border-radius: var(--radius);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.legend-color.work-day {
    background-color: var(--primary-color);
}

.legend-color.holiday {
    background-color: var(--danger-color);
}

.legend-color.half-day {
    background-color: var(--warning-color);
}

.legend-color.event {
    background-color: var(--success-color);
}

.calendar-container {
    background: var(--surface-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--background-color);
    border-bottom: 2px solid var(--border-color);
}

.calendar-day {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-cell {
    min-height: 100px;
    padding: 8px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.calendar-cell:hover {
    background-color: var(--background-color);
}

.calendar-cell.other-month {
    background-color: var(--background-color);
    color: var(--text-secondary);
    opacity: 0.5;
}

.calendar-cell[data-today="true"] {
    background-color: rgba(59, 130, 246, 0.1);
}

.day-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    font-weight: 500;
    font-size: 14px;
}

.calendar-cell[data-today="true"] .day-number {
    background-color: var(--primary-color);
    color: white;
}

.day-indicator {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
}

.day-indicator.work-day {
    background-color: var(--primary-color);
}

.day-indicator.holiday {
    background-color: var(--danger-color);
}

.day-indicator.half-day {
    background-color: var(--warning-color);
}

.day-event {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 5px;
    padding: 2px 6px;
    background: var(--background-color);
    border-radius: 3px;
}

.calendar-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Inventory Page Styles */
.inventory-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.search-box svg {
    color: var(--text-secondary);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
}

.filter-box select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--surface-color);
    cursor: pointer;
}

.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inventory-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: var(--surface-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.inventory-item:hover {
    transform: translateX(3px);
    box-shadow: var(--shadow-lg);
}

.item-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.item-sku {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sku-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.sku-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    font-family: monospace;
}

.item-name h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.item-category {
    font-size: 13px;
    color: var(--text-secondary);
}

.item-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.stock-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stock-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.stock-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.stock-indicator.in-stock {
    background-color: var(--success-color);
}

.stock-indicator.low-stock {
    background-color: var(--warning-color);
}

.stock-indicator.out-of-stock {
    background-color: var(--danger-color);
}

.item-actions {
    display: flex;
    gap: 8px;
}

.current-stock-display {
    padding: 12px;
    background: var(--background-color);
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.settings-content {
    padding: 0 25px 25px 25px;
}

.settings-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-stats {
        flex-direction: column;
        gap: 30px;
    }

    .dashboard-main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-user {
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .table-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* Appointments Page Styles */
.appointments-container {
    display: flex;
    gap: 20px;
    position: relative;
}

.calendar-section {
    flex: 1;
}

.calendar-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.calendar-title {
    flex: 1;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.calendar-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--background-color);
    border-radius: var(--radius);
}

.calendar-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.calendar-legend .legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.calendar-legend .legend-color.pending {
    background-color: var(--warning-color);
}

.calendar-legend .legend-color.approved {
    background-color: var(--primary-color);
}

.calendar-legend .legend-color.completed {
    background-color: var(--success-color);
}

.calendar-legend .legend-color.rejected {
    background-color: var(--danger-color);
}

.calendar-container {
    background: var(--surface-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calendar-header-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--background-color);
    border-bottom: 2px solid var(--border-color);
}

.calendar-header-days .calendar-day {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-cell {
    min-height: 120px;
    padding: 8px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.calendar-cell:hover {
    background-color: var(--background-color);
}

.calendar-cell.other-month {
    background-color: var(--background-color);
    color: var(--text-secondary);
    opacity: 0.5;
}

.calendar-cell[data-today="true"] {
    background-color: rgba(59, 130, 246, 0.1);
}

.calendar-cell .day-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 5px;
}

.calendar-cell[data-today="true"] .day-number {
    background-color: var(--primary-color);
    color: white;
}

.appointment-indicator {
    display: block;
    padding: 3px 6px;
    margin: 2px 0;
    border-radius: 3px;
    font-size: 11px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.appointment-indicator.pending {
    background-color: var(--warning-color);
}

.appointment-indicator.approved {
    background-color: var(--primary-color);
}

.appointment-indicator.completed {
    background-color: var(--success-color);
}

.appointment-indicator.rejected {
    background-color: var(--danger-color);
}

.appointment-indicator.in_progress {
    background-color: #17a2b8;
}

.calendar-actions {
    margin-top: 20px;
}

/* Side Panel */
.side-panel {
    width: 400px;
    background: var(--surface-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    transition: transform 0.3s ease;
}

.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.side-panel-header h3 {
    margin: 0;
    font-size: 18px;
}

.side-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.side-panel-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

/* Appointment Cards in Side Panel */
.appointment-card {
    background: var(--background-color);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--border-color);
}

.appointment-card.pending {
    border-left-color: var(--warning-color);
}

.appointment-card.approved {
    border-left-color: var(--primary-color);
}

.appointment-card.completed {
    border-left-color: var(--success-color);
}

.appointment-card.rejected {
    border-left-color: var(--danger-color);
}

.appointment-card.in_progress {
    border-left-color: #17a2b8;
    background-color: rgba(23, 162, 184, 0.05);
}

.appointment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.appointment-card-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.appointment-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.appointment-status.pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.appointment-status.approved {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.appointment-status.completed {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.appointment-status.rejected {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.appointment-card-body {
    font-size: 13px;
    color: var(--text-secondary);
}

.appointment-card-body p {
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.appointment-card-body svg {
    width: 14px;
    height: 14px;
}

.appointment-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    font-size: 0.95em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
}

.toast-notification.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.toast-notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.toast-notification.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.toast-notification.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.toast-notification svg {
    flex-shrink: 0;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Confirmation Dialog */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: center;
}

.confirm-dialog.show {
    display: flex;
}

.confirm-dialog-content {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.confirm-dialog-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.confirm-dialog-header svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.confirm-dialog-header.success {
    color: var(--success-color);
}

.confirm-dialog-header.error {
    color: var(--danger-color);
}

.confirm-dialog-header.warning {
    color: var(--warning-color);
}

.confirm-dialog-header.info {
    color: var(--primary-color);
}

.confirm-dialog-body {
    padding: 24px;
}

.confirm-dialog-body p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.confirm-dialog-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Responsive Appointments */
@media (max-width: 1024px) {
    .appointments-container {
        flex-direction: column;
    }

    .side-panel {
        width: 100%;
        position: static;
        max-height: none;
    }
}

/* Job Notes Styles */
.job-note-card {
    background: var(--surface-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 3px solid var(--primary-color);
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.job-note-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(2px);
}

.job-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.job-note-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9em;
}

.job-note-author svg {
    color: var(--primary-color);
}

.job-note-date {
    font-size: 0.8em;
    color: var(--text-secondary);
}

.job-note-content {
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.job-note-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.no-notes-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.no-notes-message svg {
    opacity: 0.3;
    margin-bottom: 16px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    background: var(--surface-color);
    padding: 30px 50px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.loading-content p {
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pricing Page */
.pricing-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 1.2em;
    color: var(--text-secondary);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.pricing-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    box-shadow: var(--shadow);
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 30px;
}

.pricing-header h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 15px;
}

.currency {
    font-size: 1.5em;
    color: var(--text-secondary);
}

.amount {
    font-size: 3em;
    font-weight: 700;
    color: var(--text-primary);
}

.period {
    font-size: 1em;
    color: var(--text-secondary);
}

.plan-description {
    color: var(--text-secondary);
    font-size: 0.95em;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li svg {
    color: var(--success-color);
    flex-shrink: 0;
}

.pricing-faq {
    max-width: 800px;
    margin: 0 auto;
}

.pricing-faq h2 {
    text-align: center;
    margin-bottom: 40px;
}

.faq-grid {
    display: grid;
    gap: 30px;
}

.faq-item h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Contact Page */
.contact-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    margin-top: 40px;
}

.contact-info h2 {
    margin-bottom: 15px;
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-item svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-item h3 {
    margin-bottom: 5px;
    font-size: 1em;
}

.contact-item p {
    color: var(--text-secondary);
    margin: 0;
}

.contact-form-container {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: var(--radius);
    text-align: center;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Public Main Content */
.public-main {
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-container {
        padding: 25px;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   COMPREHENSIVE MOBILE STYLES
   ============================================ */

/* Mobile: Hide sidebar, show bottom nav, adjust content */
@media (max-width: 767px) {
    /* Hide desktop sidebar */
    .sidebar {
        display: none !important;
    }

    /* Adjust main content for bottom nav */
    .dashboard-main {
        flex-direction: column;
        padding-bottom: calc(var(--bottom-nav-height) + 16px);
    }

    .dashboard-content {
        padding: var(--mobile-padding);
        padding-bottom: calc(var(--bottom-nav-height) + 24px);
    }

    /* Dashboard header mobile */
    .dashboard-header {
        margin-bottom: 20px;
    }

    .dashboard-header h1 {
        font-size: 22px;
    }

    /* Topbar mobile adjustments */
    .nav-user {
        gap: 12px;
    }

    .user-info {
        display: none;
    }

    /* Touch-friendly buttons */
    .btn {
        min-height: var(--touch-target-min);
        padding: 12px 20px;
    }

    .btn-sm {
        min-height: 36px;
        padding: 8px 14px;
    }

    /* Full-screen modals on mobile */
    .modal.show {
        align-items: stretch;
    }

    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }

    .modal-content.wide {
        max-width: 100% !important;
    }

    .modal-header {
        position: sticky;
        top: 0;
        background: var(--surface-color);
        z-index: 10;
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
        flex-shrink: 0;
    }

    .modal-close {
        width: var(--touch-target-min);
        height: var(--touch-target-min);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-content form {
        padding: 16px;
        overflow-y: auto;
        flex: 1;
    }

    .modal-actions {
        position: sticky;
        bottom: 0;
        background: var(--surface-color);
        padding: 16px;
        border-top: 1px solid var(--border-color);
        display: flex;
        flex-direction: column-reverse;
        gap: 12px;
        flex-shrink: 0;
    }

    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Form rows stack on mobile */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    /* Prevent iOS zoom on input focus */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 14px 16px;
        min-height: var(--touch-target-min);
    }

    /* Dashboard stats grid - 2 columns on mobile */
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-value {
        font-size: 20px;
    }

    /* Quick actions stack */
    .quick-actions {
        flex-direction: column;
    }

    .quick-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Section headers */
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .section-header .btn {
        width: 100%;
        justify-content: center;
    }

    /* Settings tabs - horizontal scroll */
    .settings-tabs {
        margin: 0 calc(-1 * var(--mobile-padding)) 20px;
        padding: 0 var(--mobile-padding);
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .settings-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 12px 16px;
        font-size: 13px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Toggle buttons stack */
    .toggle-buttons {
        flex-direction: column;
    }

    .toggle-buttons .btn-toggle {
        width: 100%;
        justify-content: center;
    }

    /* Task filters - horizontal scroll */
    .task-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        margin-bottom: -8px;
    }

    .task-filters .btn-outline {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Task cards mobile */
    .task-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .task-actions {
        width: 100%;
    }

    .task-actions .btn {
        flex: 1;
    }

    /* Inventory controls stack */
    .inventory-controls {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-box {
        width: 100%;
    }

    .filter-box select {
        width: 100%;
    }

    /* Inventory items mobile */
    .inventory-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .item-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .item-stock {
        width: 100%;
        justify-content: space-between;
        padding: 12px;
        background: var(--background-color);
        border-radius: var(--radius);
    }

    .item-actions {
        width: 100%;
        justify-content: stretch;
    }

    .item-actions .btn {
        flex: 1;
    }

    /* Calendar mobile - horizontal scroll */
    .calendar-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .calendar-grid {
        min-width: 600px;
    }

    .calendar-cell {
        min-height: 80px;
        padding: 4px;
    }

    .calendar-legend {
        flex-wrap: wrap;
        gap: 12px;
    }

    /* Side panel becomes bottom sheet */
    .side-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s;
        z-index: 100;
        top: auto;
    }

    .side-panel.active {
        transform: translateY(0);
    }

    .appointments-container {
        flex-direction: column;
    }

    /* Appointment cards mobile */
    .appointment-actions {
        flex-direction: column;
    }

    .appointment-actions .btn {
        width: 100%;
    }

    /* Job detail page */
    .job-detail-container {
        grid-template-columns: 1fr !important;
    }

    .top-actions {
        flex-direction: column;
        gap: 12px;
    }

    .top-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #jobPhotosGrid {
        grid-template-columns: 1fr !important;
    }

    .job-actions {
        flex-direction: column;
    }

    .job-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Reports page - sidebar becomes tabs */
    .reports-layout {
        flex-direction: column;
    }

    .reports-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0;
    }

    .reports-nav {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 12px;
        gap: 8px;
    }

    .reports-nav .nav-item {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 10px 16px;
        border-radius: var(--radius);
    }

    .reports-main {
        padding: var(--mobile-padding);
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .summary-card .value {
        font-size: 22px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 200px;
    }

    .comparison-row {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Customers page - card layout instead of table */
    .customers-table {
        display: none;
    }

    .customers-cards-mobile {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .customer-card-mobile {
        background: var(--surface-color);
        border-radius: var(--radius);
        padding: 16px;
        box-shadow: var(--shadow);
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .customer-card-mobile:active {
        transform: scale(0.98);
    }

    .customer-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
    }

    .customer-card-name {
        font-weight: 600;
        font-size: 16px;
        color: var(--text-primary);
    }

    .customer-card-body {
        display: flex;
        flex-direction: column;
        gap: 8px;
        font-size: 14px;
        color: var(--text-secondary);
    }

    .customer-card-body span {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .customer-card-body svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .customers-header {
        flex-direction: column;
        gap: 12px;
    }

    .customers-header .search-box {
        width: 100%;
    }

    .customers-header .btn {
        width: 100%;
    }

    /* Pagination mobile */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    /* Toast notifications mobile */
    .toast-notification {
        left: 16px;
        right: 16px;
        max-width: none;
    }

    /* Confirm dialog mobile */
    .confirm-dialog-content {
        width: 95%;
        max-width: 95%;
    }
}

/* Extra small phones (320px) */
@media (max-width: 359px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .comparison-row {
        grid-template-columns: 1fr;
    }

    .bottom-nav-item {
        min-width: 56px;
        padding: 8px 8px;
        font-size: 10px;
    }

    .bottom-nav-item svg {
        width: 20px;
        height: 20px;
    }
}

/* Desktop: Show table, hide mobile cards */
@media (min-width: 768px) {
    .customers-cards-mobile {
        display: none !important;
    }

    .customers-table {
        display: table;
    }
}

/* ============================================
   SCHEDULING SYSTEM STYLES
   ============================================ */

/* Schedule Grid for Business Hours */
.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schedule-day {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: background-color 0.2s;
}

.schedule-day:hover {
    background-color: var(--background-color);
}

.schedule-day.disabled .day-times {
    opacity: 0.4;
    pointer-events: none;
}

.day-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 150px;
}

.day-header .day-name {
    font-weight: 500;
    min-width: 80px;
}

.day-times {
    display: flex;
    align-items: center;
    gap: 10px;
}

.day-times input[type="time"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--background-color);
    font-size: 14px;
}

.day-times input[type="time"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.day-times .time-separator {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Scheduling Settings Toggles */
.scheduling-settings {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
}

.setting-info .setting-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.setting-info .setting-description {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Toggle Switch */
.switch-label,
.form-group .switch-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 0;
}

.switch-label input[type="checkbox"] {
    display: none;
}

.switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: var(--border-color);
    border-radius: 13px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.switch-label input[type="checkbox"]:checked + .switch {
    background: var(--primary-color);
}

.switch-label input[type="checkbox"]:checked + .switch::after {
    transform: translateX(22px);
}

/* Validation Styles for Appointments */
.validation-container {
    margin: 16px 0;
}

.validation-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--background-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
}

.validation-loading .spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.validation-warning {
    display: flex;
    gap: 12px;
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
    padding: 16px;
    border-radius: var(--radius);
}

.validation-warning .warning-icon {
    color: #f59e0b;
    flex-shrink: 0;
}

.validation-error {
    display: flex;
    gap: 12px;
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    padding: 16px;
    border-radius: var(--radius);
}

.validation-error .error-icon {
    color: #ef4444;
    flex-shrink: 0;
}

.validation-content {
    flex: 1;
}

.validation-content strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.validation-content p {
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.validation-content small {
    color: var(--text-secondary);
    font-style: italic;
}

.validation-conflicts {
    margin-top: 8px;
}

.conflict-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: #ef4444;
}

.conflict-item svg {
    flex-shrink: 0;
}

/* Calendar Closed Days */
.calendar-cell.closed {
    background: rgba(239, 68, 68, 0.15) !important;
}

.calendar-cell.closed .day-number {
    color: #ef4444;
}

.calendar-cell.closed .closed-label {
    font-size: 0.65em;
    color: #ef4444;
    display: block;
    margin-top: 2px;
    font-weight: 500;
}

/* Closed Days List */
.closed-days-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.closed-day-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.closed-day-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.closed-day-date {
    font-weight: 600;
    color: var(--text-primary);
}

.closed-day-reason {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.recurring-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    margin-left: 8px;
    font-weight: 500;
}

.closed-day-actions {
    display: flex;
    gap: 8px;
}

/* Add Closed Day Form */
.add-closed-day-form {
    padding: 16px;
    background: var(--background-color);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.add-closed-day-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Empty state for closed days */
.no-closed-days {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.no-closed-days svg {
    opacity: 0.3;
    margin-bottom: 16px;
}

/* Bulk Edit Section */
.bulk-edit-section {
    padding: 16px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.bulk-edit-section .form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.bulk-edit-section .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Modal Large Size */
.modal-content.modal-lg {
    max-width: 700px;
}

/* Time Slot Picker */
.time-slot-container {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    min-height: 80px;
}

.time-slot-message {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    margin: 0;
}

.time-slot-closed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--danger-color);
    padding: 16px;
}

.time-slot-closed svg {
    flex-shrink: 0;
}

.time-slots-header {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
}

.time-slot {
    padding: 10px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--surface-color);
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
}

.time-slot.available:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.time-slot.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.time-slot.unavailable {
    background: var(--background-color);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.5;
    text-decoration: line-through;
}

.time-slot.warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.time-slot.warning:hover {
    background: #ffe69c;
    border-color: #e0a800;
}

.time-slot.warning.selected {
    background: #ffc107;
    border-color: #e0a800;
    color: #000;
}

/* Responsive Time Slots */
@media (max-width: 480px) {
    .time-slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .time-slot {
        padding: 12px 6px;
        font-size: 0.85em;
    }
}

/* Sub-Tabs Navigation */
.sub-tabs {
    display: flex;
    gap: 4px;
    background: var(--background-color);
    padding: 4px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    overflow-x: auto;
}

.sub-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9em;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sub-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.5);
}

.sub-tab-btn.active {
    background: var(--surface-color);
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

.sub-tab-btn svg {
    flex-shrink: 0;
}

.sub-tab-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
}

.sub-tab-badge.success {
    background: var(--success-color);
}

.sub-tab-badge.muted {
    background: var(--text-secondary);
}

/* Sub-Tab Panels */
.sub-tab-panel {
    display: none;
}

.sub-tab-panel.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sub-Tab Panel Content */
.sub-tab-content {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.sub-tab-header {
    margin-bottom: 20px;
}

.sub-tab-header h3 {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 4px;
}

.sub-tab-header p {
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Responsive Sub-Tabs */
@media (max-width: 600px) {
    .sub-tabs {
        padding: 3px;
    }

    .sub-tab-btn {
        padding: 10px 14px;
        font-size: 0.85em;
    }

    .sub-tab-btn span.tab-label {
        display: none;
    }

    .sub-tab-content {
        padding: 16px;
    }
}

/* Inline Business Hours Grid */
.business-hours-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.hours-day-row {
    display: grid;
    grid-template-columns: 120px auto 1fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: var(--background-color);
    border-radius: var(--radius);
}

.hours-day-row.disabled {
    opacity: 0.5;
}

.hours-day-name {
    font-weight: 500;
}

.hours-day-toggle {
    justify-self: center;
}

.hours-day-times {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hours-day-times input[type="time"] {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--surface-color);
    font-size: 0.9em;
}

.hours-day-times span {
    color: var(--text-secondary);
}

/* Quick Apply Row */
.quick-apply-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px dashed rgba(59, 130, 246, 0.3);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.quick-apply-row label {
    font-weight: 500;
    white-space: nowrap;
}

.quick-apply-row input[type="time"] {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.quick-apply-row .btn {
    margin-left: auto;
}

/* Responsive Accordion */
@media (max-width: 767px) {
    .hours-day-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .hours-day-row > * {
        justify-self: start;
    }

    .hours-day-times {
        width: 100%;
    }
}

/* Responsive Scheduling Styles */
@media (max-width: 767px) {
    .schedule-day {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .day-header {
        width: 100%;
    }

    .day-times {
        width: 100%;
    }

    .day-times input[type="time"] {
        flex: 1;
    }

    .setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .add-closed-day-form .form-row {
        grid-template-columns: 1fr;
    }

    .bulk-edit-section .form-row {
        flex-direction: column;
    }

    .bulk-edit-section .form-group {
        width: 100%;
    }
}
