/* Modern Enterprise-Ready Styling */

:root {
    --primary-color: #1976d2;
    --secondary-color: #424242;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    --light-bg: #f5f5f5;
    --border-color: #e0e0e0;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
}

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

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--secondary-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styling */
header {
    background: white;
    color: var(--secondary-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 1rem 2rem;
    gap: 2rem;
}

.navbar-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo::after {
    content: '';
    width: 2px;
    height: 50px;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.05) 100%);
    border-radius: 1px;
}

.logo-img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: filter 0.3s ease;
}

.logo:hover .logo-img {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.logo-text h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    margin: 0;
    line-height: 1.1;
}

.logo-text .tagline {
    font-size: 0.7rem;
    opacity: 0.85;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.navigation {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--light-bg);
}

.nav-link:hover {
    background-color: #e3f2fd;
    transform: translateY(-2px);
    color: var(--primary-color);
}

.nav-icon {
    font-size: 1.1rem;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-button {
    background-color: var(--light-bg);
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.user-button:hover {
    background-color: #e3f2fd;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    color: var(--primary-color);
}

.user-avatar {
    font-size: 1.2rem;
}

.user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.user-button:hover .dropdown-arrow {
    transform: translateY(2px);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    margin-top: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:hover {
    background-color: var(--light-bg);
    padding-left: 1.25rem;
}

.dropdown-item.logout {
    color: var(--danger-color);
}

.dropdown-item.logout:hover {
    background-color: rgba(244, 67, 54, 0.1);
}

.item-icon {
    font-size: 1.1rem;
}

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

/* Main Content */
#mainContent {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

.container {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.col-md-6 {
    flex: 1;
    min-width: 300px;
}

.col-md-12 {
    width: 100%;
}

/* Form Styling */
.form-section {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Button Styling */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background-color: #1565c0;
    box-shadow: var(--shadow-lg);
}

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

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

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

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

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

thead {
    background-color: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--secondary-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background-color: var(--light-bg);
}

/* Alert Styling */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #e8f5e9;
    border-color: var(--success-color);
    color: #2e7d32;
}

.alert-danger {
    background-color: #ffebee;
    border-color: var(--danger-color);
    color: #c62828;
}

.alert-warning {
    background-color: #fff3e0;
    border-color: var(--warning-color);
    color: #e65100;
}

.alert-info {
    background-color: #e3f2fd;
    border-color: var(--info-color);
    color: #1565c0;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background: white;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.breadcrumb-nav nav {
    max-width: 1400px;
    width: 100%;
    padding: 1rem 2rem;
    background: white;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
}

.breadcrumb-link:hover {
    background-color: var(--light-bg);
    color: #1565c0;
}

.breadcrumb-icon {
    font-size: 1rem;
}

.breadcrumb-separator {
    color: #ccc;
    font-weight: 300;
    margin: 0 0.25rem;
    font-size: 0.9rem;
}

.breadcrumb-item.active {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-current {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.4rem 0.75rem;
}

/* Profile Settings Page */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

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

.profile-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.profile-header .subtitle {
    color: #666;
    font-size: 1rem;
}

.profile-content {
    display: grid;
    gap: 2rem;
}

.profile-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--light-bg) 0%, #f5f5f5 100%);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin: 0;
    font-weight: 600;
}

.profile-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-text {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.account-actions {
    padding: 2rem;
}

.action-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.action-info h3 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.action-info p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 768px) {
    .profile-container {
        padding: 1rem;
    }
    
    .profile-header h1 {
        font-size: 1.5rem;
    }
    
    .action-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .action-item .btn {
        width: 100%;
    }
}

/* Login Navbar */
.navbar-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1565c0 100%);
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar-login-content {
    max-width: 1400px;
    margin: 0 auto;
}

.logo-login {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.logo-img-login {
    height: 50px;
    width: auto;
    filter: brightness(1.1) drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

.logo-text-login h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: white;
    letter-spacing: -0.5px;
}

.tagline-login {
    font-size: 0.75rem;
    opacity: 0.9;
    margin: 0.25rem 0 0 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

/* Login Page Styling */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 2rem;
    margin-top: -100vh;
    padding-top: calc(100vh + 2rem);
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    max-width: 1300px;
    width: 100%;
    align-items: center;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

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

.login-header h2 {
    color: var(--secondary-color);
    font-size: 1.6rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.login-subtitle {
    color: #999;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-form label {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.login-form .form-control {
    padding: 0.85rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.login-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.btn-login {
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(25, 118, 210, 0.3);
}

.login-result {
    margin-top: 1rem;
}

.login-result .alert {
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.login-help {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}

.login-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.login-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.login-links a:hover {
    color: #1565c0;
    text-decoration: underline;
}

.login-links .divider {
    color: #ccc;
}

.login-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0 0 0.75rem 0;
    font-weight: 600;
}

.info-card p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .login-info {
        grid-template-columns: 1fr;
    }
}

/* Login Footer */
.login-footer-main {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.login-footer-main .footer-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.login-footer-main a {
    color: #90caf9;
    text-decoration: none;
    transition: color 0.3s;
}

.login-footer-main a:hover {
    color: white;
    text-decoration: underline;
}

/* Footer Styling */
footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.footer-content p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.footer-content a {
    color: #90caf9;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-content a:hover {
    color: white;
    text-decoration: underline;
}

/* DataTables Customization */
.dataTables_wrapper {
    padding: 1rem 0;
}

.dataTables_length, .dataTables_filter {
    margin-bottom: 1rem;
}

.dt-buttons {
    margin-bottom: 1rem;
}

.dt-button {
    background-color: var(--primary-color) !important;
    color: white !important;
    border: none !important;
    padding: 0.5rem 1rem !important;
    border-radius: 4px !important;
    margin-right: 0.5rem !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}

.dt-button:hover {
    background-color: #1565c0 !important;
    box-shadow: var(--shadow-lg) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .navbar-left {
        width: 100%;
    }
    
    .logo {
        gap: 0.75rem;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .logo-text h1 {
        font-size: 1.1rem;
    }
    
    .navigation {
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .navbar-right {
        width: 100%;
        justify-content: center;
    }
    
    .user-button {
        width: 100%;
        justify-content: center;
    }
    
    .user-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        width: 90%;
        max-width: 250px;
    }
    
    .user-dropdown.active {
        transform: translateX(-50%) translateY(0);
    }
    
    #mainContent {
        padding: 1rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .row {
        flex-direction: column;
    }
    
    .col-md-6 {
        width: 100%;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.75rem;
    }
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dashboard Styles */
.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.dashboard-header p {
    font-size: 1.1rem;
    color: #666;
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.company-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

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

.card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-logo {
    background: linear-gradient(135deg, var(--light-bg) 0%, #f9f9f9 100%);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border-bottom: 2px solid var(--border-color);
}

.card-logo img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.card-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex: 1;
}

.stat {
    flex: 1;
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid var(--primary-color);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-action {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-text {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.company-card:hover .btn-text {
    gap: 1rem;
}

/* Print Styles */
@media print {
    header, footer, .btn, .navigation {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .company-card {
        page-break-inside: avoid;
    }
}

/* Employee Details Styling */
.employee-details-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.employee-header-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1565c0 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.company-logo-section {
    flex-shrink: 0;
}

.company-logo-small {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    filter: brightness(1.2) drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.header-title-section {
    margin-bottom: 1.25rem;
}

.header-info h1 {
    font-size: 2.2rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.company-name-subtitle {
    font-size: 0;
    margin: 0;
    padding: 0;
}

.company-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 0.95rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 1.5rem;
}

.meta-item:first-child {
    padding-left: 0;
}

.meta-label {
    font-size: 0.75rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.meta-value {
    font-size: 0.95rem;
    font-weight: 500;
}

.meta-divider {
    width: 1px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.2);
}

.details-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
}

.details-actions .btn {
    flex: 1;
    min-width: 110px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.details-actions .btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.employee-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

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

.info-card h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item label {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item value {
    color: #333;
    font-size: 1rem;
    padding: 0.75rem;
    background-color: var(--light-bg);
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
    padding-left: 0.75rem;
}

/* Company Employees List */
.company-employees-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Company Header Section */
.company-header-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.company-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.company-logo-section {
    flex-shrink: 0;
}

.company-logo {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
}

.company-header-info h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0 0 0.25rem 0;
    font-weight: 700;
}

.company-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    font-weight: 500;
}

.btn-lg {
    padding: 0.8rem 1.8rem !important;
    font-size: 1rem !important;
    white-space: nowrap;
}

/* Search and Filter Controls */
.employees-controls {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.search-filter-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.sort-box {
    display: flex;
    gap: 0.5rem;
}

.sort-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
}

.filter-actions .btn {
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

.results-info {
    font-size: 0.9rem;
    color: #666;
    padding: 0.5rem 0;
}

.results-info strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-link {
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.pagination-link:hover:not(.disabled):not(.active) {
    background-color: var(--light-bg);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

.pagination-link.disabled {
    color: #ccc;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.pagination-ellipsis {
    color: #999;
    padding: 0.6rem 0.5rem;
}

.employees-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.employees-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0;
    font-weight: 600;
}

.employees-header .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.employees-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.employee-row {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.employee-row:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

.employee-info {
    flex: 1;
}

.employee-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.employee-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.95rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

.detail-item strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.employee-actions {
    display: flex;
    gap: 0.75rem;
    margin-left: 1rem;
}

.employee-actions .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
    .companies-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 1.8rem;
    }
    
    .companies-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card-stats {
        flex-direction: column;
    }
    
    .stat {
        border-left: none;
        border-top: 4px solid var(--primary-color);
    }
    
    /* Employee Details Mobile */
    .details-actions {
        flex-direction: column;
    }
    
    .details-actions .btn {
        width: 100%;
    }
    
    .employee-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .info-card h3 {
        font-size: 1.1rem;
    }
    
    /* Company Employees Mobile */
    .employees-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .employees-header h2 {
        font-size: 1.4rem;
    }
    
    .employees-header .btn {
        width: 100%;
        justify-content: center;
    }
    
    .employee-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .employee-details {
        flex-direction: column;
        gap: 0.75rem;
        margin: 1rem 0;
    }
    
    .employee-actions {
        width: 100%;
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .employee-actions .btn {
        flex: 1;
    }
    
    /* Company Header Mobile */
    .company-header-section {
        flex-direction: column;
        text-align: center;
    }
    
    .company-header-content {
        flex-direction: column;
        width: 100%;
    }
    
    .company-header-info h1 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        width: 100%;
    }
    
    /* Employee Details Mobile */
    .employee-header-card {
        padding: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-info h1 {
        font-size: 1.5rem;
    }
    
    .header-meta {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .details-actions {
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .details-actions .btn {
        min-width: 90px;
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .details-actions .btn span {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .employee-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .info-card h3 {
        font-size: 1.1rem;
    }
}

/* Signature Pad Styling */
.signature-container {
    width: 100%;
    max-width: 800px;
    margin: 1rem 0;
}

.signature-pad {
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: crosshair;
    background-color: white;
    display: block;
    width: 100%;
    height: 200px;
    touch-action: none;
}

.signature-pad:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

#clear-signature {
    margin-top: 0.5rem;
}

/* Legal Pages Styling */
.legal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.legal-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.legal-content h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.legal-content h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.legal-content h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.legal-content section {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.legal-content p {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1rem;
}

.legal-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    color: #333;
}

.last-updated {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.contact-info {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
    margin-top: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

/* Footer Links */
footer a {
    color: #90caf9;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: white;
    text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Export panel
   The one thing a broker comes here to do is leave with their records, so the
   panel sits directly under the company header and states plainly what the
   download contains before it is clicked.
--------------------------------------------------------------------------- */

.export-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px 32px;
    margin: 0 0 24px;
    padding: 24px 28px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.export-copy {
    flex: 1 1 260px;
    min-width: 0;
}

.export-panel h2 {
    margin: 0 0 6px;
    font-size: 1.25rem;
    line-height: 1.25;
    color: #212121;
}

.export-summary {
    margin: 0;
    color: #5f6368;
    font-size: 0.95rem;
}

.export-summary strong {
    color: #212121;
    font-variant-numeric: tabular-nums;
}

.export-actions {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.export-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.export-option {
    display: flex;
    align-items: center;
    gap: 8px;
    /* A 44px row keeps the checkbox comfortably tappable on a phone. */
    min-height: 44px;
    margin: 0;
    color: #3c4043;
    font-size: 0.9rem;
    cursor: pointer;
}

.export-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.export-note {
    max-width: 46ch;
    margin: 0;
    color: #5f6368;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* A visible focus ring everywhere, since the old sheet relied on the browser
   default and the buttons overrode it. */
.export-panel a:focus-visible,
.export-panel button:focus-visible,
.export-panel input:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

@media (max-width: 720px) {
    .export-panel {
        flex-direction: column;
        padding: 20px;
    }

    .export-actions {
        width: 100%;
    }

    .export-buttons {
        width: 100%;
    }

    .export-buttons .btn {
        flex: 1 1 100%;
        justify-content: center;
        text-align: center;
    }
}

/* One button should win. The bundle is what almost everyone wants, so the
   spreadsheet sits back as a quiet outline rather than a second dark slab. */
.export-panel .btn-secondary {
    background: #fff;
    color: #3c4043;
    border: 1px solid #c6c9cd;
}

.export-panel .btn-secondary:hover,
.export-panel .btn-secondary:focus-visible {
    background: var(--light-bg);
    border-color: #9aa0a6;
    color: #202124;
}

@media (max-width: 720px) {
    /* Stop the summary stretching and leaving a hole above the buttons. */
    .export-copy {
        flex: 0 0 auto;
    }

    .export-panel {
        gap: 16px;
    }
}
