* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@400;500;600&family=Cinzel:wght@400;700&display=swap');

/* Color Palette */
:root {
    --rose-gold: #C08B8B;
    --gunmetal: #262626;
    --soft-cloud: #F3F4F6;
    --champagne: #FDE6D9;
    --black: #111827;
    --coral: #FB7185;
    --pure-white: #FFFFFF;
    --shadow-neutral: rgba(0, 0, 0, 0.1);
}


body {
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--soft-cloud);
    min-height: 100vh;
    font-weight: 600;
}

/* Login page specific styles */
body.login-page {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    font-weight: 800;
}

.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    padding: 20px;
    box-sizing: border-box;
}

.auth-container {
    background: linear-gradient(145deg, var(--gunmetal) 0%, #1a1a1a 100%);
    border-radius: 16px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(192, 139, 139, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 40px;
    text-align: center;
    color: var(--pure-white);
    flex: 0 0 400px;
    max-width: 400px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(192, 139, 139, 0.2);
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rose-gold) 0%, var(--champagne) 100%);
    border-radius: 16px 16px 0 0;
}

.banner-container {
    flex: 1; /* Take remaining space */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px var(--shadow-neutral);
    margin-left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--soft-cloud); /* Fallback background */
}

.banner-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive design for login page */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        min-height: auto;
        padding: 10px;
    }

    .auth-container {
        flex: none;
        width: 100%;
        max-width: none;
        margin-bottom: 20px;
    }

    .banner-container {
        flex: none;
        width: 100%;
        height: 200px; /* Fixed height on mobile */
        margin-left: 0;
    }
}

.auth-container a {
    color: var(--pure-white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    position: relative;
    padding: 2px 0;
}

.auth-container a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background: var(--rose-gold);
    transition: width 0.3s ease;
}

.auth-container a:hover {
    color: var(--rose-gold);
    transform: translateY(-1px);
}

.auth-container a:hover::after {
    width: 100%;
}

.auth-container a:hover {
    color: var(--rose-gold);
}

/* Dark theme inputs for login card */
.auth-container .form-group input,
.auth-container .form-group select,
.auth-container .form-group textarea {
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: var(--pure-white);
    font-weight: 500;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-container .form-group label {
    color: var(--pure-white) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 700;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.auth-container .form-group input::placeholder,
.auth-container .form-group select::placeholder,
.auth-container .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.auth-container .form-group input:focus,
.auth-container .form-group select:focus,
.auth-container .form-group textarea:focus {
    border-color: var(--rose-gold);
    box-shadow: 
        0 0 0 3px rgba(192, 139, 139, 0.25), 
        0 4px 16px rgba(192, 139, 139, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.logo {
    margin-bottom: 40px;
}

.logo h1 {
    color: var(--rose-gold);
    margin-bottom: 10px;
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
}

.logo p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-weight: 500;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.auth-container a#forgotPasswordLink {
    color: var(--rose-gold);
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 16px;
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(192, 139, 139, 0.1);
    border: 1px solid rgba(192, 139, 139, 0.3);
    transition: all 0.3s ease;
}

.tabs {
    display: flex;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(192, 139, 139, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
}

.tab-button {
    flex: 1;
    padding: 12px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--pure-white);
    text-transform: uppercase;
    position: relative;
}

.tab-button.active {
    background: linear-gradient(135deg, var(--rose-gold) 0%, var(--champagne) 100%);
    color: var(--gunmetal);
    font-weight: 800;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 139, 139, 0.3);
    border-radius: 6px;
}

.tab-button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.tab-button:active {
    transform: translateY(0);
}

.form-container {
    text-align: left;
}

.form-container h2 {
    margin-bottom: 20px;
    color: var(--pure-white);
    font-weight: 800;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--pure-white) !important;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
    color: var(--black);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--rose-gold);
    box-shadow: 0 0 0 3px rgba(192, 139, 139, 0.25), 0 4px 16px rgba(192, 139, 139, 0.15);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.form-group select {
    cursor: pointer;
    appearance: none;
  
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
}

.form-group select:hover,
.form-group textarea:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px var(--shadow-neutral);
}

.form-group select:focus {
   
}

.btn-primary {
    width: 100%;
    padding: 14px 12px;
    background: linear-gradient(135deg, var(--rose-gold) 0%, var(--champagne) 100%);
    color: var(--gunmetal);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 16px rgba(192, 139, 139, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(192, 139, 139, 0.4);
    background: linear-gradient(135deg, var(--champagne) 0%, var(--rose-gold) 100%);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(192, 139, 139, 0.3);
}

.message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.message.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--pure-white);
    border: 1px solid var(--sage-green);
}

.message.error {
    background: rgba(251, 113, 133, 0.2);
    color: var(--pure-white);
    border: 1px solid var(--coral);
}

.hidden {
    display: none;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.15), rgba(26, 32, 63, 0.25));
}

.page-panel {
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 28px;
    padding: 36px;
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(102, 126, 234, 0.25);
    backdrop-filter: blur(6px);
}

.page-panel h1 {
    margin: 6px 0;
    font-size: 2rem;
    color: #191c39;
}

.page-panel .page-subtitle {
    color: #5c6272;
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.brand-pill {
    display: inline-flex;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.12);
    color: #3b46b9;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.form-grid {
    display: grid;
    gap: 20px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gunmetal);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e1e5f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    box-shadow: 
        0 2px 8px rgba(102, 126, 234, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    color: var(--black);
    font-weight: 500;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--rose-gold);
    box-shadow: 
        0 0 0 3px rgba(192, 139, 139, 0.15),
        0 4px 16px rgba(192, 139, 139, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: rgba(192, 139, 139, 0.4);
    box-shadow: 
        0 4px 16px rgba(192, 139, 139, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
}

.form-actions {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid rgba(192, 139, 139, 0.15);
}

.form-actions .btn-primary {
    flex: 1;
    background: linear-gradient(135deg, var(--rose-gold) 0%, var(--champagne) 100%);
    color: var(--gunmetal);
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(192, 139, 139, 0.2);
    letter-spacing: 0.02em;
}

.form-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(192, 139, 139, 0.3);
}

.form-actions .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.2);
}

.form-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
    text-decoration: none;
    color: white;
}

.btn-link {
    color: var(--gunmetal);
    font-weight: 600;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    transition: color 0.3s, background 0.3s;
}

.btn-link:hover {
    background: var(--champagne);
    color: var(--gunmetal);
}

.status-message {
    margin-top: 12px;
    font-size: 0.95rem;
    min-height: 1.3em;
}

.status-message.success {
    color: var(--sage-green);
}

.status-message.error {
    color: var(--coral);
}

@media (max-width: 600px) {
    .page-panel {
        padding: 28px 24px;
    }

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

    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
        text-align: center;
        padding: 16px;
        font-size: 16px;
    }
    
    .social-section {
        padding: 16px;
        margin-top: 20px;
    }
    
    .social-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .social-header h4 {
        font-size: 1rem;
    }
}

/* Dashboard Styles */
.dashboard-container {
    height: 100vh;
    background: #f8f9fa;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.sidebar {
    width: 250px;
    background: var(--gunmetal);
    box-shadow: 2px 0 10px var(--shadow-neutral);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.sidebar-header h2 {
    color: var(--rose-gold);
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 12px 20px;
    color: var(--pure-white);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: var(--champagne);
    color: var(--gunmetal);
}

.sidebar-nav a.active {
    background: var(--rose-gold);
    color: var(--gunmetal);
    border-left-color: var(--rose-gold);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
    width: 100%;
}

.btn-secondary:hover {
    background: #0f1a2a;
}

/* Link buttons styling */
a.btn-primary,
a.btn-secondary {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

a.btn-primary:hover,
a.btn-secondary:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #c0392b;
}

.main-content {
    margin-left: 250px;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions {
    position: relative;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #dde3f2;
    background: #fff;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    position: relative;
}

.user-profile:hover {
    border-color: #b6c0d8;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.user-profile img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.profile-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.profile-text span {
    font-size: 0.95rem;
}

.profile-label {
    font-size: 0.8rem;
    color: #6b6f85;
}

.caret {
    font-size: 0.75rem;
    color: #6c6f85;
}

.user-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    width: 180px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
    border: 1px solid #e1e5f0;
    transform-origin: top right;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 200;
}

.user-dropdown.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(4px);
}

.dropdown-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border: none;
    background: none;
    font-size: 0.95rem;
    color: #2f3565;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-link:hover {
    background: #f1f3fb;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    margin-right: 15px;
    display: none;
}

.main-header h1 {
    margin: 0;
    color: var(--black);
}

.content-area {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
    background: var(--soft-cloud);
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.configuration-content {
    width: 100%;
    margin: 0 auto;
}

/* Full width for inventory page */
.inventory-page .configuration-content {
    max-width: none;
    width: 100%;
}

.config-submenu {
    margin: 32px 0 28px 0;
    display: flex;
    gap: 16px;
    border-bottom: 2px solid rgba(192, 139, 139, 0.1);
    position: relative;
}

.config-submenu::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--rose-gold) 0%, var(--champagne) 100%);
    border-radius: 1px;
    opacity: 0.3;
}

.submenu-item {
    padding: 14px 24px;
    border-radius: 12px;
    border: 2px solid transparent;
    background: transparent;
    color: var(--gunmetal);
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.submenu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(192, 139, 139, 0.1) 0%, rgba(192, 139, 139, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.submenu-item:hover::before {
    opacity: 1;
}

.submenu-item:hover {
    background: rgba(192, 139, 139, 0.1);
    color: var(--gunmetal);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(192, 139, 139, 0.2);
}

.submenu-item.active {
    background: linear-gradient(135deg, var(--rose-gold) 0%, var(--champagne) 100%);
    color: var(--gunmetal);
    border-color: var(--rose-gold);
    box-shadow: 
        0 4px 16px rgba(192, 139, 139, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    font-weight: 800;
}

.submenu-item.active::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.config-panel-area {
    margin-top: 18px;
}

.config-panel {
    display: none;
}

.config-panel.active {
    display: block;
}

.config-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 24px;
}

/* Make create form wider for email and PDF templates */
.config-panel[data-config-panel="email-templates"] .config-grid,
.config-panel[data-config-panel="pdf-templates"] .config-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 1.5fr);
}

/* PDF Template Editor Layout Improvements */
.pdf-template-editor {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 12px;
}

.template-canvas {
    width: 100%;
    height: 400px;
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

.template-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

.template-toolbar .btn-link {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    color: #374151 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.template-toolbar .btn-link:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white !important;
    border-color: #d97706;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.template-element {
    position: relative;
    min-width: 20px;
    min-height: 20px;
}

.template-element .delete-element {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.template-element .delete-element:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

.panel-heading {
    margin-bottom: 16px;
}

.panel-heading h4 {
    margin: 0;
    font-size: 1.3rem;
    color: #1f2140;
}

.panel-heading p {
    margin: 6px 0 0;
    color: #6b6f85;
    font-size: 0.95rem;
}

.departments-panel,
.department-form-panel {
    background: white;
    border-radius: 22px;
    padding: 26px;
    box-shadow: 0 25px 65px rgba(13, 20, 55, 0.15);
    border: 1px solid #e2e7f2;
}

.departments-grid {
    display: grid;
    gap: 18px;
    margin-top: 12px;
}

.department-card {
    border-radius: 18px;
    border: 1px solid #e6e9f4;
    padding: 18px;
    background: white;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.department-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.department-card-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.department-card-actions {
    display: flex;
    gap: 6px;
}

.department-card-actions button {
    padding: 6px 12px;
    border-radius: 8px;
}

.department-members {
    background: #f6f8ff;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px dashed #d2daec;
}

.department-members p {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: #5c637d;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.member-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.member-pill {
    background: #eef0ff;
    color: #333b70;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
}

.member-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.member-pill .remove-member {
    background: transparent;
    border: none;
    color: #a02f2f;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
}

.member-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.member-select {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #dfe3ed;
    font-size: 0.95rem;
    background: #fdfdff;
}

.member-actions button {
    min-width: 140px;
}

@media (max-width: 960px) {
    .config-grid {
        grid-template-columns: 1fr;
    }

    .member-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

.workflow-panel {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5f0;
}

.workflow-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.workflow-card {
    background: #f6f8ff;
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #dde3f2;
}

.workflow-card h4 {
    margin: 0;
    font-size: 1rem;
}

.workflow-card ul {
    padding-left: 20px;
    margin: 0;
    color: #4c5270;
}

.calendar-views {
    margin-top: 24px;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.calendar-card {
    border: 1px solid #dfe3ed;
    border-radius: 16px;
    padding: 16px;
    background: #ffffff;
}

.calendar-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    font-size: 0.9rem;
    color: #4c5270;
}

.appointment-footer {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: #5c6272;
}

.list-panel {
    margin-top: 20px;
    border: 1px solid #e2e5f3;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
}

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f2f8;
}

.list-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.list-body {
    width: 100%;
}

.list-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    padding: 12px 22px;
    border-bottom: 1px solid #f4f5fb;
    align-items: center;
}

.list-row.header {
    background: #f7f8ff;
    font-weight: 600;
}

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

.list-actions {
    display: flex;
    gap: 2px;
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 100px;
}

.btn-link.small,
.btn-secondary.small {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.btn-danger.small {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.social-section {
    margin-top: 24px;
    border-radius: 16px;
    border: 2px solid rgba(192, 139, 139, 0.15);
    padding: 20px;
    background: linear-gradient(145deg, #fdfdfd 0%, #fefefe 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.social-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(192, 139, 139, 0.1);
}

.social-header h4 {
    margin: 0;
    color: var(--gunmetal);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-header h4::before {
    content: '🌐';
    font-size: 1rem;
}

.btn-link.small {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.social-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef1ff;
    font-size: 0.85rem;
    color: #2f3565;
}

.social-pill button {
    border: none;
    background: transparent;
    color: #c0392b;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
}

.social-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    color: white;
    margin-right: 6px;
}

.social-logo.instagram { background: var(--rose-gold); color: var(--gunmetal); }
.social-logo.facebook { background: var(--champagne); color: var(--gunmetal); }
.social-logo.x { background: var(--gunmetal); color: var(--pure-white); }
.social-logo.youtube { background: var(--coral); color: var(--pure-white); }
.social-logo.tiktok { background: var(--soft-cloud); color: var(--gunmetal); }

.social-card {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 12px;
    background: var(--rose-gold);
    color: var(--gunmetal);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px var(--shadow-neutral), 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.social-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.social-card:hover::before {
    left: 100%;
}

.social-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4), 0 4px 16px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.social-card:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.1s;
}

.social-card .social-logo {
    margin-right: 10px;
    width: 22px;
    height: 22px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.social-card .follower-count {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-left: 6px;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.social-card.instagram {
    background: var(--rose-gold);
    color: var(--gunmetal);
    box-shadow: 0 4px 16px var(--shadow-neutral), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-card.instagram:hover {
    box-shadow: 0 8px 32px rgba(192, 139, 139, 0.4), 0 4px 16px rgba(0, 0, 0, 0.15);
}

.social-card.facebook {
    background: var(--champagne);
    color: var(--gunmetal);
    box-shadow: 0 4px 16px var(--shadow-neutral), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-card.facebook:hover {
    box-shadow: 0 8px 32px rgba(253, 230, 217, 0.4), 0 4px 16px rgba(0, 0, 0, 0.15);
}

.social-card.x {
    background: var(--gunmetal);
    color: var(--pure-white);
    box-shadow: 0 4px 16px var(--shadow-neutral), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-card.x:hover {
    box-shadow: 0 8px 32px rgba(38, 38, 38, 0.4), 0 4px 16px rgba(0, 0, 0, 0.15);
}

.social-card.youtube {
    background: var(--coral);
    color: var(--pure-white);
    box-shadow: 0 4px 16px var(--shadow-neutral), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-card.youtube:hover {
    box-shadow: 0 8px 32px rgba(251, 113, 133, 0.4), 0 4px 16px rgba(0, 0, 0, 0.15);
}

.social-card.tiktok {
    background: var(--soft-cloud);
    color: var(--gunmetal);
    box-shadow: 0 4px 16px var(--shadow-neutral), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-card.tiktok:hover {
    box-shadow: 0 8px 32px rgba(243, 244, 246, 0.4), 0 4px 16px rgba(0, 0, 0, 0.15);
}

.social-form.hidden {
    display: none;
}
.inventory-table {
    margin-top: 20px;
    border-radius: 16px;
    background: #fdfdfd;
    border: 1px solid #e3e8f5;
}

.inventory-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 12px 18px;
    align-items: center;
    gap: 10px;
}

.inventory-row.header {
    font-weight: 600;
    background: #edf1ff;
}

.inventory-row + .inventory-row {
    border-top: 1px solid #edf1ff;
}

.tag {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
}

.card-social {
    margin-top: 6px;
}

.tag.low-stock {
    background: rgba(229, 83, 83, 0.15);
    color: #c0392b;
}

.tag.healthy {
    background: rgba(16, 185, 129, 0.15);
    color: var(--sage-green);
}

.tag.reorder {
    background: rgba(70, 130, 180, 0.15);
    color: #1f4f8b;
}

.muted {
    color: #6b6f85;
    font-size: 0.9rem;
}

.user-management-panel {
    background: linear-gradient(180deg, #ffffff 0%, #eef2ff 60%);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 20px 50px rgba(26, 32, 63, 0.12);
    border: 1px solid rgba(102, 126, 234, 0.25);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.section-subtitle {
    margin-top: 6px;
    color: #5c6272;
    font-size: 0.95rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions .btn-primary {
    width: auto;
    min-width: 150px;
    padding: 12px 18px;
}

.search-wrap {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-wrap input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dfe3ed;
    border-radius: 999px;
    background: white;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.search-wrap input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.history-search-wrap {
    margin-bottom: 24px;
    position: relative;
    max-width: 450px;
}

.history-search-wrap::before {
    content: '🔍';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b6f85;
    font-size: 1rem;
    z-index: 1;
}

.history-search-wrap input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e1e5f0;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.12);
    color: #1f2140;
}

.history-search-wrap input::placeholder {
    color: #6b6f85;
    font-weight: 400;
}

.history-search-wrap input:focus {
    outline: none;
    border-color: var(--rose-gold);
    box-shadow: 0 0 0 4px rgba(192, 139, 139, 0.2), 0 8px 32px rgba(192, 139, 139, 0.25);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.history-search-wrap input:hover {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.user-stats-grid {
    margin-top: 20px;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.user-stat-card {
    background: white;
    border-radius: 18px;
    padding: 18px 16px;
    border: 1px solid #edf0f7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.user-stat-card p {
    margin: 0;
    color: #7a82a2;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.user-stat-card h4 {
    margin: 6px 0 0;
    font-size: 2rem;
    color: #2f3565;
}

.user-filters {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-pill {
    border: 1px solid transparent;
    background: white;
    color: #4a5ac7;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-pill.active {
    border-color: #4a5ac7;
    background: #4a5ac7;
    color: white;
}

.users-list {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.user-card {
    background: white;
    border-radius: 18px;
    padding: 22px;
    border: 1px solid #e0e6f0;
    box-shadow: 0 12px 28px rgba(14, 29, 68, 0.12);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.user-card-header h4 {
    margin: 0;
    color: #1f2140;
    font-size: 1.2rem;
}

.user-card-header p {
    margin: 4px 0 0;
    color: #6b6f85;
    font-size: 0.9rem;
}

.status-pill {
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-verified {
    background: rgba(16, 185, 129, 0.12);
    color: var(--sage-green);
}

.status-pending {
    background: rgba(251, 113, 133, 0.15);
    color: var(--coral);
}

.user-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #555b72;
    font-size: 0.85rem;
}

.user-card-meta p {
    margin: 0;
}

.user-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.user-card-actions button {
    flex: 1;
    min-width: 120px;
}

.empty-list {
    padding: 40px 32px;
    text-align: center;
    border-radius: 16px;
    background: linear-gradient(145deg, #fdfdfd 0%, #fafbff 100%);
    border: 2px dashed rgba(192, 139, 139, 0.3);
    color: #6c6f7c;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 4px 16px rgba(192, 139, 139, 0.08);
    position: relative;
    overflow: hidden;
}

.empty-list::before {
    content: '📋';
    font-size: 2rem;
    display: block;
    margin-bottom: 16px;
    opacity: 0.6;
}

.status-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    display: none;
    border: 1px solid;
}

.status-message.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.15) 100%);
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.status-message.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.15) 100%);
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

/* Enhanced button styles for task management */
.task-actions .btn-link,
.template-actions .btn-link,
.recurring-actions .btn-link {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(102, 126, 234, 0.15) 100%);
    color: #4a5ac7;
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.task-actions .btn-link:hover,
.template-actions .btn-link:hover,
.recurring-actions .btn-link:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(102, 126, 234, 0.25) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    color: #3b46b9;
}

.task-actions .btn-danger,
.template-actions .btn-danger,
.recurring-actions .btn-danger {
    background: linear-gradient(135deg, rgba(229, 83, 83, 0.1) 0%, rgba(229, 83, 83, 0.15) 100%);
    color: #c0392b;
    border: 1px solid rgba(229, 83, 83, 0.3);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.task-actions .btn-danger:hover,
.template-actions .btn-danger:hover,
.recurring-actions .btn-danger:hover {
    background: linear-gradient(135deg, rgba(229, 83, 83, 0.2) 0%, rgba(229, 83, 83, 0.25) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 83, 83, 0.2);
    color: #a02f2f;
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    margin: 0 0 10px 0;
    color: var(--rose-gold);
    font-size: 2rem;
}

.stat-card p {
    margin: 0;
    color: #666;
}

.recent-activity {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.recent-activity h3 {
    margin-bottom: 15px;
    color: var(--black);
}

.profile-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-content h3 {
    margin-bottom: 20px;
    color: var(--black);
}

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

.browse-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s;
}

.browse-card:hover {
    transform: translateY(-5px);
}

.browse-card h3 {
    margin: 0 0 10px 0;
    color: var(--rose-gold);
}

.browse-card p {
    margin: 0;
    color: #666;
}

@media (max-width: 768px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 15px;
    }
}

/* Clinics Page Styles */
.clinics-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.clinics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 20px;
    color: #f9f9f9;
}

.clinics-header h1 {
    margin-bottom: 4px;
    font-size: 2.4rem;
}

.clinics-header .subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.clinics-header .btn-secondary {
    width: auto;
    padding: 10px 24px;
}

.clinic-search-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.clinic-search-description h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #2c2c2c;
}

.clinic-search-description p {
    margin-top: 8px;
    color: #555;
}

.clinic-filters {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: end;
}

.clinic-filters .form-group {
    margin: 0;
}

.clinic-filters label {
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    display: block;
}

.clinic-filters input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.clinic-filters input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
    outline: none;
}

.search-action {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.clinic-search-card .btn-primary {
    width: 180px;
}

.clinic-results-card {
    background: white;
    border-radius: 14px;
    padding: 26px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.results-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #282828;
}

.results-summary {
    font-size: 0.95rem;
    color: #555;
}

.clinics-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.clinic-card {
    background: #fdfdfd;
    padding: 20px;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.clinic-card h3 {
    margin-bottom: 4px;
    color: #2f2f2f;
}

.clinic-card p {
    margin: 0;
    color: #555;
}

.clinic-card h4 {
    margin: 12px 0 6px;
    font-size: 1rem;
    color: #333;
}

.clinic-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clinic-card li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.clinic-card li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.clinic-card small {
    color: #888;
    font-size: 0.9rem;
}

.empty-state {
    margin: 0;
    padding: 24px;
    text-align: center;
    color: #666;
    background: #fafafa;
    border-radius: 10px;
    border: 1px dashed #ddd;
}

.suggestions {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 1000;
    display: none;
}

.suggestions div {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.suggestions div:hover {
    background: #f8f9fa;
}

.suggestions div:last-child {
    border-bottom: none;
}

.form-group {
    position: relative;
}

/* Autocomplete Suggestions */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 1px solid #e1e5f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(102, 126, 234, 0.08);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.autocomplete-suggestions .suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f2f8;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.autocomplete-suggestions .suggestion-item:hover,
.autocomplete-suggestions .suggestion-item.selected {
    background-color: #f8f9fa;
}

.autocomplete-suggestions .suggestion-item:last-child {
    border-bottom: none;
}

.autocomplete-suggestions .suggestion-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--rose-gold);
    color: var(--gunmetal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    flex-shrink: 0;
}

.autocomplete-suggestions .suggestion-info {
    flex: 1;
    min-width: 0;
}

.autocomplete-suggestions .suggestion-name {
    font-weight: 600;
    color: #1f2140;
    margin: 0 0 2px 0;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-suggestions .suggestion-contact {
    color: #6b6f85;
    font-size: 0.85rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-suggestions .no-results {
    padding: 16px;
    text-align: center;
    color: #6b6f85;
    font-style: italic;
}

/* Lead Fields in Main Form */
.lead-fields {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

/* Customer Edit Layout */
.customer-edit-layout {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.customer-form-section {
    flex: 0 0 30%;
    min-width: 0;
}

.customer-history-section {
    flex: 0 0 70%;
    min-width: 0;
}

.customer-history-section .page-panel {
    width: 100%;
    max-width: none;
}

/* Responsive Customer Edit Layout */
@media (max-width: 1024px) {
    .customer-edit-layout {
        flex-direction: column;
        gap: 20px;
    }

    .customer-history-section {
        flex: none;
        width: 100%;
    }

    .history-cards-grid {
        flex-direction: column;
        overflow-x: visible;
    }
}

.history-cards-grid {
    display: flex;
    flex-direction: row;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.history-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f2f8;
}

.card-header h5 {
    margin: 0;
    color: #1f2140;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-count {
    background: var(--rose-gold);
    color: var(--gunmetal);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-history-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e9ecef;
}

.mini-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.mini-history-date {
    font-weight: 600;
    color: #1f2140;
    font-size: 0.9rem;
}

.mini-history-details {
    color: #6b6f85;
    font-size: 0.85rem;
    line-height: 1.4;
}

.more-items {
    text-align: center;
    color: #6b6f85;
    font-size: 0.85rem;
    font-style: italic;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px dashed #d1d5db;
}

.empty-state {
    text-align: center;
    padding: 20px;
    color: #6b6f85;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

.error-state {
    text-align: center;
    padding: 20px;
    color: var(--coral);
    font-style: italic;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

/* Customer History Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Photo Modal Specific Styles */
.photo-modal-content {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.photo-modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 1001;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e1e5f0;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    color: #1f2140;
    font-size: 1.4rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b6f85;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #e9ecef;
    color: #1f2140;
}

.modal-body {
    padding: 0;
}

.history-detail-grid {
    padding: 24px;
    width: 100%;
    max-height: 60vh;
    overflow-y: auto;
    display: grid;
    gap: 12px;
}

.history-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8ecf3;
}

.history-detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.history-detail-row .label {
    font-weight: 600;
    color: #4b4f64;
}

.history-detail-row .value {
    text-align: right;
    color: #1f2140;
    max-width: 60%;
    word-break: break-word;
}

.history-detail-row .value pre {
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/* Customer History Tabs */
.customer-history-tabs {
    display: flex;
    border-bottom: 1px solid #e1e5f0;
    background: #f8f9fa;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b6f85;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.tab-button:hover {
    background: #e9ecef;
    color: #1f2140;
}

.tab-button.active {
    background: white;
    color: var(--rose-gold);
    border-bottom-color: var(--rose-gold);
}

/* Tab Content */
.customer-history-content {
    max-height: 400px;
    overflow-y: auto;
}

.tab-content {
    display: none;
    padding: 20px 24px;
}

.tab-content.active {
    display: block;
}

/* History Items */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e9ecef;
}

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

.history-date {
    font-weight: 600;
    color: #1f2140;
    font-size: 1rem;
}

.history-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px 16px;
}

.history-info {
    font-size: 0.9rem;
    color: #4a5568;
}

.history-info strong {
    color: #1f2140;
}

/* Loading and Empty States */
.loading, .empty-state, .error-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b6f85;
    font-style: italic;
}

.error-state {
    color: var(--coral);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

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

    .clinics-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .clinics-header .btn-secondary {
        width: 100%;
    }

    .clinic-filters {
        grid-template-columns: 1fr;
    }

    .search-action {
        justify-content: center;
    }

    .clinic-search-card .btn-primary {
        width: 100%;
        max-width: none;
    }

    .clinics-list {
        grid-template-columns: 1fr;
    }

    .clinic-results-card {
        padding: 20px;
    }

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

    .browse-options {
        grid-template-columns: 1fr;
    }

    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions .btn-primary {
        width: 100%;
    }

    .user-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .user-filters {
        justify-content: flex-start;
    }

    .user-card-actions {
        flex-direction: column;
    }

    .users-list {
        grid-template-columns: 1fr;
    }

    .user-management-panel {
        padding: 24px;
    }
}

/* Appointment Booking Cards */
.appointment-booking-container {
    max-width: 1200px;
    margin: 0 auto;
}

.booking-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.booking-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5f0;
}

.booking-form-card h4 {
    margin-bottom: 20px;
    color: #1f2140;
    font-size: 1.3rem;
}

.customer-info-card h4 {
    margin-bottom: 20px;
    color: #1f2140;
    font-size: 1.3rem;
}

/* Form Layout Enhancements */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

/* Customer Info Display */
.customer-info-display {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.no-customer-selected {
    text-align: center;
    padding: 40px 20px;
    color: #6b6f85;
    font-size: 0.95rem;
}

.customer-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.customer-avatar {
    text-align: center;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--rose-gold);
    color: var(--gunmetal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto;
}

.customer-basic-info {
    text-align: center;
}

.customer-basic-info h5 {
    margin: 0 0 8px 0;
    color: #1f2140;
    font-size: 1.4rem;
}

.customer-basic-info p {
    margin: 0;
    color: #6b6f85;
    font-size: 0.95rem;
}

.customer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.stat-label {
    margin: 0 0 4px 0;
    font-size: 0.8rem;
    color: #6b6f85;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-value {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2140;
}

.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--sage-green);
}

.customer-additional-info {
    flex: 1;
}

.customer-additional-info h6 {
    margin: 0 0 12px 0;
    color: #1f2140;
    font-size: 1rem;
    font-weight: 600;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f8;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.info-item span:last-child {
    color: #6b6f85;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.customer-actions {
    margin-top: auto;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.customer-actions .btn-link {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e1e5f0;
    background: white;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.customer-actions .btn-link:hover {
    background: #f8f9fa;
    border-color: #b6c0d8;
    color: #2d3748;
}

.customer-actions .btn-secondary {
    flex: 1;
    text-align: center;
}

/* Walk-in customer fields */
.walkin-fields {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    border: 1px solid #e9ecef;
}

.walkin-fields .form-group {
    margin-bottom: 12px;
}

.walkin-fields .form-group:last-child {
    margin-bottom: 0;
}

/* Search Results Panel */
.search-results-panel {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5f0;
    margin-top: 24px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.results-header h4 {
    margin: 0;
    font-size: 1.3rem;
    color: #1f2140;
}

.results-summary {
    font-size: 0.95rem;
    color: #6b6f85;
}

.results-body {
    max-height: 600px;
    overflow-y: auto;
}

.results-list {
    width: 100%;
}

.empty-row {
    text-align: center;
    padding: 40px 20px;
    color: #6b6f85;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px dashed #d1d5db;
}

/* Responsive Design for Booking Cards */
@media (max-width: 1024px) {
    .booking-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .customer-info-card {
        order: -1; /* Show customer info first on mobile */
    }
}

@media (max-width: 768px) {
    .booking-card {
        padding: 20px;
        border-radius: 16px;
    }

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

    .customer-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .customer-actions {
        flex-direction: column;
        gap: 8px;
    }

    .customer-actions .btn-link,
    .customer-actions .btn-secondary {
        width: 100%;
        padding: 12px;
        font-size: 0.95rem;
    }

    .booking-form-card h4,
    .customer-info-card h4 {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }
}

/* Ensure proper card content containment */
.booking-card {
    display: flex;
    flex-direction: column;
    min-height: 0; /* Allow flex items to shrink */
}

.customer-info-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.customer-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.customer-additional-info {
    flex: 1;
    margin-top: auto;
}

/* Fix form content overflow */
.appointment-booking-container {
    width: 100%;
    overflow: hidden;
}

.booking-card .form-group {
    min-width: 0; /* Allow form elements to shrink */
}

.booking-card input,
.booking-card select,
.booking-card textarea {
    min-width: 0;
    width: 100%;
}

/* Line items table styling */
.line-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.line-items-table th,
.line-items-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.line-items-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.line-items-table td input,
.line-items-table td select {
    border: 1px solid #ddd;
    padding: 4px;
    border-radius: 3px;
    font-size: 14px;
}

.line-items-table td input:focus,
.line-items-table td select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.line-items-table .item-total {
    background-color: #f8f9fa;
    font-weight: 500;
}

.line-items-table .remove-item {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.line-items-table .remove-item:hover {
    background-color: #c82333;
}

.line-items-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 2px solid #eee;
    text-align: right;
}

.total-row {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* Appointment to Treatment Page Styles */
.appointment-details-section {
    margin-bottom: 30px;
}

.treatments-section {
    margin-bottom: 30px;
}

.section-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5f0;
}

.section-card h3 {
    margin: 0 0 20px 0;
    color: #1f2140;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Section Header with Add Button */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e1e5f0;
}

.section-header h3 {
    margin: 0;
    color: #1f2140;
    font-size: 1.3rem;
    font-weight: 600;
}

.btn-icon {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Treatments Container */
.treatments-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Treatment Cards */
.treatment-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    border: 2px solid #e9ecef;
    position: relative;
    transition: all 0.3s ease;
}

.treatment-card:hover {
    border-color: var(--rose-gold);
    box-shadow: 0 4px 16px rgba(192, 139, 139, 0.1);
}

/* Treatment Card Content - Two Column Layout */
.treatment-card-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.treatment-form-section,
.treatment-photo-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.treatment-form-section h5,
.treatment-photo-section h5 {
    margin: 0 0 16px 0;
    color: #1f2140;
    font-size: 1rem;
    font-weight: 600;
}

.treatment-photo-section h6 {
    margin: 12px 0 8px 0;
    color: #4b4f64;
    font-size: 0.9rem;
    font-weight: 600;
}

.treatment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.treatment-card-header h4 {
    margin: 0;
    color: #1f2140;
    font-size: 1.1rem;
    font-weight: 600;
}

.treatment-number {
    color: var(--rose-gold);
    font-weight: 700;
}

.remove-treatment-btn {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #c0392b;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    font-weight: bold;
    position: relative;
}

.remove-treatment-btn:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: #c0392b;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.remove-icon {
    font-size: 1.2rem;
    line-height: 1;
    font-weight: bold;
}

/* Treatment Form Grid */
.treatment-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.treatment-form-grid .form-group {
    margin-bottom: 0;
}

.treatment-form-grid .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #4b4f64;
    font-size: 0.9rem;
}

.treatment-form-grid input,
.treatment-form-grid textarea,
.treatment-form-grid select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.treatment-form-grid input:focus,
.treatment-form-grid textarea:focus,
.treatment-form-grid select:focus {
    outline: none;
    border-color: var(--rose-gold);
    box-shadow: 0 0 0 3px rgba(192, 139, 139, 0.1);
}

/* PIC Selection Styles */
.selected-pics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    padding: 8px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.selected-pic-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--rose-gold);
    color: var(--gunmetal);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.selected-pic-item .remove-pic {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #c0392b;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.selected-pic-item .remove-pic:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: #c0392b;
    transform: scale(1.1);
}

.pic-select {
    margin-top: 8px;
}

/* Product Selection Styles */
.selected-products {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 40px;
    padding: 8px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.selected-product-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--champagne);
    color: var(--gunmetal);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(192, 139, 139, 0.2);
}

.selected-product-item .product-name {
    flex: 1;
    font-weight: 600;
}

.selected-product-item .product-quantity {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 0.85rem;
    background: white;
}

.selected-product-item .product-quantity:focus {
    outline: none;
    border-color: var(--rose-gold);
    box-shadow: 0 0 0 2px rgba(192, 139, 139, 0.2);
}

.selected-product-item .remove-product {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #c0392b;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.selected-product-item .remove-product:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: #c0392b;
    transform: scale(1.1);
}

.product-search {
    margin-top: 8px;
    position: relative;
}

.product-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e5f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.product-suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f2f8;
    transition: background-color 0.2s;
}

.product-suggestion-item:hover,
.product-suggestion-item.selected {
    background-color: #f8f9fa;
}

.product-suggestion-item:last-child {
    border-bottom: none;
}

.product-info .product-name {
    font-weight: 600;
    color: #1f2140;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.product-info .product-description {
    color: #6b6f85;
    font-size: 0.8rem;
}

.product-suggestions .no-results {
    padding: 12px;
    text-align: center;
    color: #6b6f85;
    font-style: italic;
}

/* Treatment Photo Sections */
.treatment-photo-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.treatment-photo-sections .photo-upload-section h5 {
    margin: 0 0 12px 0;
    color: #1f2140;
    font-size: 1rem;
    font-weight: 600;
}

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

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f8;
}

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

.detail-row .label {
    font-weight: 600;
    color: #4b4f64;
    font-size: 0.95rem;
}

.detail-row .value {
    color: #1f2140;
    font-size: 0.95rem;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.detail-actions {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e1e5f0;
}

.detail-actions .btn-primary {
    min-width: 120px;
}

/* Photo Upload Sections */
.photo-upload-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.photo-upload-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 2px dashed #d1d5db;
    transition: all 0.3s ease;
}

.photo-upload-section:hover {
    border-color: var(--rose-gold);
    background: #fefefe;
}

.photo-upload-section.drag-over {
    border-color: var(--rose-gold);
    background: rgba(192, 139, 139, 0.05);
    transform: scale(1.02);
}

.photo-upload-section h4 {
    margin: 0 0 16px 0;
    color: #1f2140;
    font-size: 1.1rem;
    font-weight: 600;
}

.photo-upload-area {
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.photo-upload-area:hover {
    border-color: var(--rose-gold);
    background: #fefefe;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-icon {
    font-size: 2rem;
    opacity: 0.6;
}

.upload-placeholder p {
    margin: 0;
    color: #6b6f85;
    font-weight: 500;
}

.upload-placeholder small {
    color: #9ca3af;
    font-size: 0.85rem;
}

.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e9ecef;
    background: white;
}

.photo-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.remove-photo:hover {
    background: rgba(176, 42, 55, 0.9);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .treatment-photo-sections,
    .photo-upload-sections {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .treatment-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .selected-product-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .selected-product-item .product-quantity {
        width: 50px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

@media (max-width: 768px) {
    .appointment-info-grid {
        grid-template-columns: 1fr;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .detail-row .value {
        text-align: left;
        max-width: 100%;
    }

    .photo-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }

    .photo-item img {
        height: 70px;
    }

    .section-card {
        padding: 20px;
    }

    .treatment-card {
        padding: 20px;
    }

    .treatment-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .section-header h3 {
        margin-bottom: 8px;
    }

    .treatments-container {
        gap: 20px;
    }

    .treatment-form-grid {
        gap: 12px;
    }

    /* Mobile: Stack treatment card content vertically */
    .treatment-card-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .treatment-form-section,
    .treatment-photo-section {
        padding: 16px;
    }

    .treatment-photo-sections {
        gap: 16px;
    }
}

/* Bill of Materials Styles */
.bom-container {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    background: #f8f9fa;
}

.bom-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
    gap: 12px;
    font-weight: 600;
    color: #4b4f64;
    font-size: 0.9rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.bom-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bom-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
    gap: 12px;
    align-items: center;
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.bom-item .product-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

.bom-item .quantity-input,
.bom-item .cost-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
}

.bom-item .total-cost {
    font-weight: 600;
    color: #1f2140;
    text-align: center;
}

.bom-item .remove-bom-item {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #c0392b;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.bom-item .remove-bom-item:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: #c0392b;
    transform: scale(1.1);
}

.bom-cost-summary {
    margin-top: 16px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.cost-summary-item {
    text-align: center;
}

.cost-summary-label {
    font-size: 0.85rem;
    color: #6b6f85;
    margin-bottom: 4px;
}

.cost-summary-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2140;
}

.running-numbers-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.running-numbers-help {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e9ecef;
    margin-top: 20px;
}

.running-numbers-help h4 {
    margin: 0 0 12px 0;
    color: #1f2140;
    font-size: 1rem;
    font-weight: 600;
}

.running-numbers-help ul {
    margin: 0;
    padding-left: 20px;
}

.running-numbers-help li {
    margin-bottom: 8px;
    color: #6b6f85;
    line-height: 1.4;
}

.running-numbers-help strong {
    color: #1f2140;
}

.running-number-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.running-number-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.running-number-header h4 {
    margin: 0 0 4px 0;
    color: #1f2140;
    font-size: 1.1rem;
    font-weight: 600;
}

.running-number-header p {
    margin: 0;
    color: #6b6f85;
    font-size: 0.9rem;
}

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

.running-number-form {
    border-top: 1px solid #e9ecef;
    padding-top: 16px;
}

.running-number-edit-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: end;
}

.running-number-edit-form .form-group {
    margin-bottom: 0;
}

.running-number-edit-form .form-actions {
    grid-column: 1 / -1;
    margin-top: 8px;
}

/* Timesheet Styles */
.clock-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Scheduling Styles */
.calendar-section {
    margin-bottom: 24px;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.calendar-controls button {
    padding: 8px 12px;
    border: 1px solid #e1e5f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.calendar-controls button:hover {
    background: #f8f9fa;
    border-color: var(--rose-gold);
}

#currentWeekRange {
    font-weight: 600;
    color: #1f2140;
    flex: 1;
    text-align: center;
    min-width: 200px;
}

.schedule-calendar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    min-height: 300px;
}

.shift-templates-section {
    margin-bottom: 24px;
}

.shift-templates-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.shift-template-item {
    background: white;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.shift-template-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--rose-gold);
}

.timesheet-info {
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.document-number {
    font-size: 0.95rem;
    color: #1f2140;
    text-align: center;
}

.clock-section h5 {
    margin: 0 0 16px 0;
    color: #1f2140;
    font-size: 1.1rem;
    font-weight: 600;
}

.clock-display {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.clock-time {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.clock-status-text {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 16px;
}

.clock-completed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    margin-top: 16px;
}

.clock-btn {
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.clock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.activities-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.activities-section h5 {
    margin: 0 0 16px 0;
    color: #1f2140;
    font-size: 1.1rem;
    font-weight: 600;
}

.activity-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.activity-controls .btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.activity-controls .btn-secondary:hover {
    background: #5a6268;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #f1f3f4;
    border-color: var(--rose-gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.activity-type {
    font-weight: 600;
    color: #1f2140;
    font-size: 0.95rem;
}

.activity-time {
    color: #6b6f85;
    font-size: 0.85rem;
    font-weight: 500;
}

.activity-description {
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.4;
}

.activity-auto {
    background: rgba(251, 113, 133, 0.1);
    color: var(--coral);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 8px;
}

/* Mobile specific adjustments */
@media (max-width: 480px) {
    .treatment-card-header h4 {
        font-size: 1rem;
    }

    .treatment-form-grid input,
    .treatment-form-grid textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .photo-upload-area {
        padding: 16px;
    }

    .upload-placeholder p {
        font-size: 0.9rem;
    }

    .bom-header,
    .bom-item {
        grid-template-columns: 2fr 1fr 1fr 1fr 0.5fr;
        gap: 8px;
    }

    .bom-item .product-select,
    .bom-item .quantity-input,
    .bom-item .cost-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .clock-display {
        padding: 20px;
    }

    .clock-time {
        font-size: 2rem;
    }

    .activity-controls {
        flex-direction: column;
    }

    .activity-controls .btn-primary,
    .activity-controls .btn-secondary {
        width: 100%;
    }
}

/* Import Leave Management Styles */
@import url('leave-management-styles.css');

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e1e5f0;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    color: #1f2140;
    font-size: 1.4rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b6f85;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #e9ecef;
    color: #1f2140;
}

.modal-body {
    padding: 24px;
    max-height: calc(80vh - 140px);
    overflow-y: auto;
}

.modal-body p {
    margin: 0 0 16px 0;
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.5;
}

.modal-body .form-group {
    margin-bottom: 0;
}

.modal-body textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 16px;
    border: 2px solid #e1e5f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--rose-gold);
    box-shadow: 0 0 0 3px rgba(192, 139, 139, 0.1);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5f0;
}

.modal-actions .btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-actions .btn-secondary:hover {
    background: #5a6268;
}

.modal-actions .btn-primary {
    background: var(--rose-gold);
    color: var(--gunmetal);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 139, 139, 0.3);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 20px;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-header h3 {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 20px;
    }

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

    .modal-actions .btn-primary,
    .modal-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }
/* Google Calendar Style Weekly View */
.google-calendar-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

/* Desktop responsive adjustments */
@media (min-width: 1200px) {
    .google-calendar-container {
        max-width: 1400px;
    }

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

    .time-row {
        grid-template-columns: 100px repeat(7, 1fr);
    }

    .day-header {
        padding: 16px 12px;
    }

    .day-name {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .day-number {
        font-size: 1.6rem;
    }

    .month-name {
        font-size: 0.8rem;
    }

    .time-label {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .day-column {
        min-height: 80px;
        padding: 4px;
    }

    .shift-event {
        padding: 6px 8px;
        font-size: 0.8rem;
    }

    .shift-title {
        font-size: 0.75rem;
    }

    .shift-time {
        font-size: 0.7rem;
    }

    .shift-notes {
        font-size: 0.65rem;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .google-calendar-container {
        max-width: 100%;
        overflow-x: auto;
    }

    .calendar-header {
        grid-template-columns: 90px repeat(7, 1fr);
        min-width: 800px;
    }

    .time-row {
        grid-template-columns: 90px repeat(7, 1fr);
        min-width: 800px;
    }

    .day-column {
        min-width: 100px;
    }
}

.calendar-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    min-width: 0; /* Allow grid to shrink */
}

.time-column-header {
    /* Empty space for time column */
}

.day-header {
    padding: 12px 8px;
    text-align: center;
    border-right: 1px solid #e9ecef;
    position: relative;
    min-width: 0; /* Allow content to shrink */
    overflow: hidden;
}

.day-header:last-child {
    border-right: none;
}

.day-header.today {
    background: rgba(192, 139, 139, 0.1);
}

.day-header.today .day-name,
.day-header.today .day-number {
    color: var(--rose-gold);
    font-weight: 700;
}

.day-name {
    font-size: 0.8rem;
    color: #6b6f85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2140;
    line-height: 1;
}

.month-name {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-body {
    position: relative;
    overflow-x: auto; /* Allow horizontal scrolling on small screens */
}

.time-row {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    border-bottom: 1px solid #f0f2f8;
    min-height: 60px;
    min-width: 0; /* Allow grid to shrink */
}

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

.time-label {
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #6b6f85;
    text-align: right;
    border-right: 1px solid #e9ecef;
    background: #f8f9fa;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-column {
    border-right: 1px solid #f0f2f8;
    position: relative;
    min-height: 60px;
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: 0; /* Allow content to shrink */
    padding: 2px;
}

.day-column:last-child {
    border-right: none;
}

.day-column:hover {
    background-color: rgba(192, 139, 139, 0.05);
}

.day-column.today {
    background-color: rgba(192, 139, 139, 0.03);
}

.day-column.today::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--rose-gold);
    z-index: 1;
}

.current-time-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--rose-gold);
    z-index: 10;
    pointer-events: none;
}

.current-time-line::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -4px;
    width: 10px;
    height: 10px;
    background: var(--rose-gold);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.shift-event {
    position: absolute;
    left: 2px;
    right: 2px;
    background: #667eea;
    color: white;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 0.75rem;
    border: 1px solid #667eea;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.shift-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 6;
}

.shift-event.pending {
    opacity: 0.8;
    border-style: dashed;
}

.shift-event.confirmed {
    opacity: 1;
    border-style: solid;
}

.shift-title {
    font-weight: 600;
    font-size: 0.7rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shift-time {
    font-size: 0.65rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shift-notes {
    font-size: 0.6rem;
    opacity: 0.8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Calendar Grid Styles (Legacy - keeping for compatibility) */
.calendar-grid-container {
    display: grid;
    grid-template-columns: 150px repeat(7, 1fr);
    gap: 1px;
    background: #e1e5f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.calendar-header-row {
    display: contents;
}

.calendar-corner {
    background: #f8f9fa;
    padding: 12px;
    font-weight: 600;
    color: #1f2140;
    border-bottom: 2px solid #e1e5f0;
}

.calendar-day-header {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: #1f2140;
    border-bottom: 2px solid #e1e5f0;
    font-size: 0.9rem;
}

.calendar-day-header.today {
    background: var(--rose-gold);
    color: var(--gunmetal);
}

.day-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 4px;
}

.calendar-staff-row {
    display: contents;
}

.calendar-staff-name {
    background: white;
    padding: 16px 12px;
    font-weight: 600;
    color: #1f2140;
    border-right: 2px solid #e1e5f0;
    display: flex;
    align-items: center;
    min-height: 80px;
}

.calendar-day-cell {
    background: white;
    min-height: 80px;
    padding: 4px;
    position: relative;
    border-right: 1px solid #f0f2f8;
    border-bottom: 1px solid #f0f2f8;
}

.calendar-day-cell:last-child {
    border-right: none;
}

.empty-shift-slot {
    width: 100%;
    height: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: transparent;
}

.empty-shift-slot:hover {
    background: #f8f9fa;
    color: var(--rose-gold);
    border: 1px dashed var(--rose-gold);
}

.shift-block {
    background: #667eea;
    color: white;
    padding: 6px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    border: 2px solid #667eea;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
}

.shift-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.shift-block.pending {
    opacity: 0.8;
    border-style: dashed;
}

.shift-block.confirmed {
    opacity: 1;
    border-style: solid;
}

.shift-time {
    font-weight: 600;
    font-size: 0.75rem;
    line-height: 1.2;
}

.shift-notes {
    font-size: 0.7rem;
    opacity: 0.9;
    margin-top: 2px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-empty-state {
    grid-column: 1 / -1;
    padding: 40px 20px;
    text-align: center;
    color: #6b6f85;
    font-style: italic;
    background: white;
}

/* Responsive Calendar */
@media (max-width: 1024px) {
    .calendar-grid-container {
        grid-template-columns: 120px repeat(7, 1fr);
        font-size: 0.9rem;
    }

    .calendar-staff-name {
        padding: 12px 8px;
        font-size: 0.9rem;
    }

    .calendar-day-header {
        padding: 8px 4px;
        font-size: 0.8rem;
    }

    .day-number {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .calendar-grid-container {
        grid-template-columns: 100px repeat(7, 1fr);
        gap: 1px;
    }

    .calendar-staff-name {
        padding: 8px 6px;
        font-size: 0.8rem;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        white-space: nowrap;
        min-height: 120px;
        justify-content: center;
    }

    .calendar-day-header {
        padding: 6px 2px;
        font-size: 0.7rem;
    }

    .day-number {
        font-size: 0.9rem;
        margin-top: 2px;
    }

    .calendar-day-cell {
        min-height: 60px;
        padding: 2px;
    }

    .empty-shift-slot {
        min-height: 40px;
        font-size: 0.7rem;
    }

    .shift-block {
        padding: 4px 6px;
        font-size: 0.7rem;
    }

    .shift-time {
        font-size: 0.65rem;
    }

    .shift-notes {
        font-size: 0.6rem;
    }
}
}

/* Card-based Calendar Styles */
.calendar-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.day-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--rose-gold);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.day-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2140;
}

.day-date {
    font-size: 0.9rem;
    color: #6b6f85;
    font-weight: 500;
}

.day-content {
    min-height: 120px;
}

.day-content.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: #9ca3af;
    font-style: italic;
}

.add-shift-btn {
    background: var(--rose-gold);
    color: var(--gunmetal);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.add-shift-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 139, 139, 0.3);
}

.add-shift-btn i {
    font-size: 0.8rem;
}

.shift-cards-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shift-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.shift-card:hover {
    background: #f1f3f4;
    border-color: var(--rose-gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.shift-time {
    font-weight: 600;
    color: #1f2140;
    font-size: 0.9rem;
}

.shift-staff {
    color: #6b6f85;
    font-size: 0.8rem;
    font-weight: 500;
}

.shift-details {
    color: #4a5568;
    font-size: 0.85rem;
    line-height: 1.4;
}

.edit-shift-btn {
    background: none;
    border: none;
    color: #6b6f85;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.edit-shift-btn:hover {
    background: #e9ecef;
    color: #1f2140;
}

/* Responsive Card Calendar */
@media (max-width: 1024px) {
    .calendar-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
    }

    .day-card {
        padding: 16px;
    }

    .day-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .calendar-cards-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .day-card {
        padding: 14px;
    }

    .day-header {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .day-name {
        font-size: 1rem;
    }

    .day-date {
        font-size: 0.85rem;
    }

    .day-content {
        min-height: 100px;
    }

    .shift-card {
        padding: 10px;
    }

    .shift-time {
        font-size: 0.85rem;
    }

    .shift-staff {
        font-size: 0.75rem;
    }

    .shift-details {
        font-size: 0.8rem;
    }
}

/* Enhanced User Form Layout Styles */
.user-form-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 32px;
    align-items: start;
}

.user-form-card {
    background: linear-gradient(145deg, #ffffff 0%, #fdfdfd 100%);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid rgba(192, 139, 139, 0.15);
    box-shadow: 
        0 8px 32px rgba(192, 139, 139, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.user-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rose-gold) 0%, var(--champagne) 100%);
    border-radius: 20px 20px 0 0;
}

.shift-management-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafbff 100%);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid rgba(102, 126, 234, 0.15);
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.shift-management-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

.user-form-card h3 {
    margin: 0 0 24px 0;
    color: var(--gunmetal);
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-form-card h3::before {
    content: '👤';
    font-size: 1.2rem;
}

.card-subtitle {
    margin: 0 0 24px 0;
    color: #6b6f85;
    font-size: 1rem;
    line-height: 1.6;
    background: linear-gradient(135deg, #fdfdff 0%, #fefefe 100%);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(192, 139, 139, 0.1);
    font-weight: 500;
}

.shift-management-card h3 {
    margin: 0 0 24px 0;
    color: #2f3565;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.shift-management-card h3::before {
    content: '📅';
    font-size: 1.2rem;
}

.shift-description {
    margin: 0 0 24px 0;
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.6;
    background: linear-gradient(135deg, #f8f9ff 0%, #fefefe 100%);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    font-weight: 500;
}

/* Enhanced Shift Templates Section */
.shift-templates-section h4 {
    margin: 0 0 16px 0;
    color: #2f3565;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shift-templates-section h4::before {
    content: '⚡';
    font-size: 1rem;
}

.shift-templates-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.shift-template-item {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 12px;
    padding: 16px;
    border: 2px solid #e9ecef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.shift-template-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.shift-template-item:hover {
    background: linear-gradient(145deg, #f8f9ff 0%, #ffffff 100%);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15), 0 3px 10px rgba(0, 0, 0, 0.1);
}

.shift-template-item:hover::before {
    transform: scaleX(1);
}

.shift-template-info h5 {
    margin: 0 0 8px 0;
    color: #1f2140;
    font-size: 1rem;
    font-weight: 700;
}

.shift-template-info p {
    margin: 0;
    color: #6b6f85;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Enhanced Weekly Schedule Section */
.weekly-schedule h4 {
    margin: 0 0 20px 0;
    color: #2f3565;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.weekly-schedule h4::before {
    content: '📋';
    font-size: 1rem;
}

.week-days {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.day-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #fdfdfd 100%);
    border-radius: 12px;
    border: 2px solid #f0f2f8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.day-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--rose-gold) 0%, var(--champagne) 100%);
    border-radius: 0 2px 2px 0;
    transition: height 0.3s ease;
}

.day-row:hover {
    background: linear-gradient(145deg, #fefefe 0%, #fafafa 100%);
    border-color: rgba(192, 139, 139, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(192, 139, 139, 0.1);
}

.day-row:hover::before {
    height: 60%;
}

.day-label {
    min-width: 90px;
    font-weight: 700;
    color: #1f2140;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.day-shift-select {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5f0;
    border-radius: 10px;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: #2f3565;
}

.day-shift-select:focus {
    outline: none;
    border-color: var(--rose-gold);
    box-shadow: 0 0 0 3px rgba(192, 139, 139, 0.15), 0 4px 16px rgba(192, 139, 139, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

/* Enhanced Shift Actions */
.shift-actions {
    display: flex;
    gap: 16px;
    margin-top: 28px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.shift-actions .btn-primary,
.shift-actions .btn-secondary {
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
}

.shift-actions .btn-primary {
    background: linear-gradient(135deg, var(--rose-gold) 0%, var(--champagne) 100%);
    color: var(--gunmetal);
    border: 2px solid transparent;
}

.shift-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 139, 139, 0.3);
}

.shift-actions .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: 2px solid transparent;
}

.shift-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

/* Enhanced Responsive Design for User Forms */
@media (max-width: 1024px) {
    .user-form-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .user-form-card,
    .shift-management-card {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .user-form-layout {
        gap: 24px;
        margin-top: 24px;
    }

    .user-form-card,
    .shift-management-card {
        padding: 20px;
        border-radius: 16px;
    }

    .user-form-card h3,
    .shift-management-card h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .shift-description {
        padding: 14px;
        margin-bottom: 20px;
    }

    .shift-templates-list {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 24px;
    }

    .shift-template-item {
        padding: 14px;
    }

    .weekly-schedule h4 {
        margin-bottom: 16px;
    }

    .day-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }

    .day-label {
        min-width: auto;
        font-size: 1rem;
        text-align: left;
    }

    .day-shift-select {
        padding: 12px;
        font-size: 0.95rem;
    }

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

    .shift-actions .btn-primary,
    .shift-actions .btn-secondary {
        width: 100%;
        text-align: center;
        padding: 14px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .user-form-layout {
        gap: 20px;
        margin-top: 20px;
    }

    .user-form-card,
    .shift-management-card {
        padding: 16px;
        border-radius: 14px;
    }

    .user-form-card h3,
    .shift-management-card h3 {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }

    .shift-templates-list {
        gap: 12px;
    }

    .shift-template-item {
        padding: 12px;
    }

    .day-row {
        padding: 12px;
        gap: 10px;
    }

    .day-shift-select {
        padding: 10px;
    }

    .shift-actions {
        margin-top: 20px;
    }
/* Enhanced Task Management Styles */

.task-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.task-controls .btn-primary,
.task-controls .btn-secondary {
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.task-controls .btn-primary {
    background: linear-gradient(135deg, var(--rose-gold) 0%, var(--champagne) 100%);
    color: var(--gunmetal);
    box-shadow: 0 4px 16px rgba(192, 139, 139, 0.3);
}

.task-controls .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(192, 139, 139, 0.4);
}

.task-controls .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.3);
}

.task-controls .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.task-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.task-filters select {
    padding: 12px 16px;
    border: 2px solid #e1e5f0;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    color: #2f3565;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 160px;
    cursor: pointer;
}

.task-filters select:focus {
    outline: none;
    border-color: var(--rose-gold);
    box-shadow: 0 0 0 3px rgba(192, 139, 139, 0.15), 0 4px 16px rgba(192, 139, 139, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.task-lists-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.task-card {
    background: linear-gradient(145deg, #ffffff 0%, #fdfdfd 100%);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid rgba(192, 139, 139, 0.1);
    box-shadow: 
        0 8px 32px rgba(192, 139, 139, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rose-gold) 0%, var(--champagne) 100%);
    border-radius: 16px 16px 0 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.task-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 16px 48px rgba(192, 139, 139, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(192, 139, 139, 0.3);
}

.task-card:hover::before {
    transform: scaleX(1);
}

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

.task-card-header h5 {
    margin: 0;
    color: var(--gunmetal);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    line-height: 1.3;
}

.task-status {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.task-status.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.25) 100%);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.task-status.completed {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(102, 126, 234, 0.25) 100%);
    color: #4a5ac7;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.task-status.cancelled {
    background: linear-gradient(135deg, rgba(229, 83, 83, 0.15) 0%, rgba(229, 83, 83, 0.25) 100%);
    color: #c0392b;
    border: 1px solid rgba(229, 83, 83, 0.3);
}

.task-description {
    color: #6b6f85;
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.5;
    font-weight: 500;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.task-type {
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2ff 100%);
    color: #4a5568;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.task-due {
    color: #e53e3e;
    font-weight: 700;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    background: rgba(229, 83, 83, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(229, 83, 83, 0.2);
}

.task-assignees {
    color: #6b6f85;
    font-weight: 600;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
}

.task-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid rgba(192, 139, 139, 0.1);
}

.task-actions button {
    flex: 1;
    min-width: 80px;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

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

.task-stat-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafbff 100%);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    border: 2px solid rgba(102, 126, 234, 0.15);
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.task-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.task-stat-card:hover {
    background: linear-gradient(145deg, #fafbff 0%, #ffffff 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 16px 48px rgba(102, 126, 234, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(102, 126, 234, 0.3);
}

.task-stat-card:hover::before {
    transform: scaleX(1);
}

.task-stat-card h5 {
    margin: 0 0 12px 0;
    font-size: 2.2rem;
    font-weight: 800;
    color: #667eea;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.task-stat-card p {
    margin: 0;
    color: #6b6f85;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
}

.task-activity-section,
.upcoming-tasks-section {
    margin-top: 32px;
}

.task-activity-section h5,
.upcoming-tasks-section h5 {
    margin: 0 0 20px 0;
    color: #2f3565;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-activity-section h5::before {
    content: '⚡';
    font-size: 1rem;
}

.upcoming-tasks-section h5::before {
    content: '📅';
    font-size: 1rem;
}

.activity-list,
.upcoming-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item,
.upcoming-task-item {
    background: linear-gradient(145deg, #ffffff 0%, #fdfdfd 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(192, 139, 139, 0.1);
    box-shadow: 0 4px 16px rgba(192, 139, 139, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.activity-item:hover,
.upcoming-task-item:hover {
    background: linear-gradient(145deg, #fefefe 0%, #fafafa 100%);
    border-color: rgba(192, 139, 139, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(192, 139, 139, 0.15);
}

.activity-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-content strong {
    color: var(--gunmetal);
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
}

.activity-content p {
    margin: 0;
    color: #6b6f85;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
}

.activity-content small {
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
}

.upcoming-task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.task-content {
    flex: 1;
}

.task-content strong {
    color: var(--gunmetal);
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
}

.task-content p {
    margin: 6px 0 0 0;
    color: #6b6f85;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
}

.task-priority {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid;
}

.priority-low {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.25) 100%);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.3);
}

.priority-medium {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.25) 100%);
    color: #d69e2e;
    border-color: rgba(251, 191, 36, 0.3);
}

.priority-high {
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.15) 0%, rgba(251, 113, 133, 0.25) 100%);
    color: var(--coral);
    border-color: rgba(251, 113, 133, 0.3);
}

.priority-urgent {
    background: linear-gradient(135deg, rgba(229, 83, 83, 0.15) 0%, rgba(229, 83, 83, 0.25) 100%);
    color: #c0392b;
    border-color: rgba(229, 83, 83, 0.3);
}

.templates-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
}

.template-card {
    background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid rgba(192, 139, 139, 0.1);
    box-shadow: 
        0 8px 32px rgba(192, 139, 139, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rose-gold) 0%, var(--champagne) 100%);
    border-radius: 16px 16px 0 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 16px 48px rgba(192, 139, 139, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(192, 139, 139, 0.3);
}

.template-card:hover::before {
    transform: scaleX(1);
}

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

.template-card-header h5 {
    margin: 0;
    color: var(--gunmetal);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    line-height: 1.3;
}

.template-category {
    background: linear-gradient(135deg, var(--rose-gold) 0%, var(--champagne) 100%);
    color: var(--gunmetal);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    box-shadow: 0 2px 8px rgba(192, 139, 139, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.template-description {
    color: #6b6f85;
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.5;
    font-weight: 500;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
}

.template-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.template-duration {
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2ff 100%);
    color: #4a5568;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.template-priority {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    border: 1px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.template-instructions {
    margin-bottom: 20px;
    background: linear-gradient(145deg, #fafbff 0%, #fdfdfd 100%);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.template-instructions strong {
    color: var(--gunmetal);
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: block;
    font-weight: 700;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
}

.template-instructions pre {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #4a5568;
    white-space: pre-wrap;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
    font-weight: 500;
}

.template-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid rgba(192, 139, 139, 0.1);
}

.template-actions button {
    flex: 1;
    min-width: 80px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.recurring-schedules-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.recurring-card {
    background: linear-gradient(145deg, #ffffff 0%, #fdfdfd 100%);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid rgba(192, 139, 139, 0.1);
    box-shadow: 
        0 8px 32px rgba(192, 139, 139, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.recurring-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rose-gold) 0%, var(--champagne) 100%);
    border-radius: 16px 16px 0 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.recurring-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 16px 48px rgba(192, 139, 139, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(192, 139, 139, 0.3);
}

.recurring-card:hover::before {
    transform: scaleX(1);
}

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

.recurring-card-header h5 {
    margin: 0;
    color: var(--gunmetal);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    line-height: 1.3;
}

.recurring-status {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid;
}

.recurring-status.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.25) 100%);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.3);
}

.recurring-status.inactive {
    background: linear-gradient(135deg, rgba(229, 83, 83, 0.15) 0%, rgba(229, 83, 83, 0.25) 100%);
    color: #c0392b;
    border-color: rgba(229, 83, 83, 0.3);
}

.recurring-description {
    color: #6b6f85;
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.5;
    font-weight: 500;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
}

.recurring-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.recurring-type,
.recurring-time {
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2ff 100%);
    color: #4a5568;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.recurring-assigned {
    color: #6b6f85;
    font-weight: 600;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
}

.recurring-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid rgba(192, 139, 139, 0.1);
}

.recurring-actions button {
    flex: 1;
    min-width: 80px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.template-controls,
.recurring-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.template-controls .btn-primary,
.recurring-controls .btn-primary,
.recurring-controls .btn-secondary {
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-family: 'Segoe UI', 'Segoe UI Bold', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    min-width: 160px;
    position: relative;
    overflow: hidden;
}

.template-controls .btn-primary,
.recurring-controls .btn-primary {
    background: linear-gradient(135deg, var(--rose-gold) 0%, var(--champagne) 100%);
    color: var(--gunmetal);
    box-shadow: 0 4px 16px rgba(192, 139, 139, 0.3);
}

.template-controls .btn-primary:hover,
.recurring-controls .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(192, 139, 139, 0.4);
}

.recurring-controls .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.3);
}

.recurring-controls .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

/* Task Detail Modal Styles */
.task-detail-header {
    margin-bottom: 24px;
}

.task-detail-header h4 {
    margin: 0 0 8px 0;
    color: #1f2140;
    font-size: 1.3rem;
    font-weight: 600;
}

.task-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    font-size: 0.9rem;
}

.task-detail-meta span {
    color: #6b6f85;
}

.task-detail-meta .status {
    font-weight: 600;
}

.task-items-section,
.task-comments-section {
    margin-bottom: 24px;
}

.task-items-section h5,
.task-comments-section h5 {
    margin: 0 0 16px 0;
    color: #1f2140;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
}

.task-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.task-item:hover {
    background: #f1f3f4;
}

.task-item.completed {
    opacity: 0.7;
    background: rgba(16, 185, 129, 0.05);
}

.task-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.task-item-title {
    flex: 1;
    font-weight: 500;
    color: #1f2140;
}

.task-item.completed .task-item-title {
    text-decoration: line-through;
    color: #6b6f85;
}

.task-item-description {
    margin: 4px 0 0 0;
    color: #6b6f85;
    font-size: 0.9rem;
    line-height: 1.4;
}

.task-item details {
    margin-top: 8px;
}

.task-item details summary {
    cursor: pointer;
    color: var(--rose-gold);
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.task-item details pre {
    background: #f1f3f4;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
    white-space: pre-wrap;
    color: #4a5568;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e9ecef;
}

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

.comment-header strong {
    color: #1f2140;
    font-size: 0.9rem;
}

.comment-header small {
    color: #9ca3af;
    font-size: 0.8rem;
}

.comment-item p {
    margin: 0;
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* PDF Template Editor Styles */
.pdf-template-editor {
    border: 2px solid #e1e5f0;
    border-radius: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.08);
}

.template-canvas {
    min-height: 400px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: white;
    position: relative;
    margin-bottom: 16px;
    overflow: hidden;
}

.template-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.template-toolbar button {
    padding: 8px 16px;
    border: 2px solid #e1e5f0;
    border-radius: 8px;
    background: white;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.template-toolbar button:hover {
    background: var(--rose-gold);
    color: var(--gunmetal);
    border-color: var(--rose-gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 139, 139, 0.2);
}

.template-element {
    position: absolute;
    border: 1px dashed #ccc;
    cursor: move;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #333;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.template-element:hover {
    border-color: var(--rose-gold);
    box-shadow: 0 4px 16px rgba(192, 139, 139, 0.2);
}

.delete-element {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e74c3c;
    color: white;
    border: none;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    transition: all 0.2s ease;
}

.delete-element:hover {
    background: #c0392b;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.pdf-templates-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Responsive PDF Template Editor */
@media (max-width: 768px) {
    .pdf-template-editor {
        padding: 16px;
    }

    .template-canvas {
        min-height: 300px;
    }

    .template-toolbar {
        gap: 8px;
    }

    .template-toolbar button {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .pdf-templates-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Responsive Task Management */
@media (max-width: 768px) {
    .task-lists-display,
    .templates-display,
    .recurring-schedules-display {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .task-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
    }

    .task-controls,
    .template-controls,
    .recurring-controls {
        flex-direction: column;
        gap: 10px;
    }

    .task-card-header,
    .template-card-header,
    .recurring-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .task-actions,
    .template-actions,
    .recurring-actions {
        flex-direction: column;
        gap: 8px;
    }

    .task-actions button,
    .template-actions button,
    .recurring-actions button {
        width: 100%;
        min-width: auto;
    }

    .task-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .task-item input[type="checkbox"] {
        align-self: flex-start;
    }

    .upcoming-task-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
}
