/* Modern Enterprise Design System */

/* Base Styles */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-size: 14px;
    color: #111827;
    background: #FAFBFC;
    line-height: 1.5;
}

/* Utilities */
.container-custom {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
}

.card-modern {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.card-modern:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 150ms ease;
}

.btn-modern {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 150ms ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #6366F1;
    color: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: #4F46E5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #E5E7EB;
}

.btn-secondary:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.btn-ghost {
    background: transparent;
    color: #6B7280;
}

.btn-ghost:hover {
    background: #F3F4F6;
}

.btn-destructive {
    background: #EF4444;
    color: white;
}

.btn-destructive:hover {
    background: #DC2626;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

.form-input {
    height: 40px;
    padding: 0 12px;
    background: white;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    transition: all 150ms ease;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border: 2px solid #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input.error {
    border: 2px solid #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-helper {
    font-size: 12px;
    color: #6B7280;
    margin-top: 6px;
}

.form-error {
    font-size: 12px;
    color: #EF4444;
    margin-top: 6px;
}

/* Form Container */
.form-container {
    width: 100%;
    box-sizing: border-box;
}

.form-container .card-modern {
    padding-top: 32px;
    padding-right: 32px;
    padding-bottom: 32px;
    padding-left: 32px;
    box-sizing: border-box;
}

.form-container .card-modern form {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.form-container .card-modern form > div {
    width: 100%;
    max-width: none;
    margin-right: 0;
    box-sizing: border-box;
}

.form-container .card-modern .form-group {
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
    box-sizing: border-box;
}

.form-container .card-modern .form-input {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    box-sizing: border-box;
}

/* Button Alignment in Form */
.form-container .card-modern .flex {
    display: flex;
    align-items: center;
    gap: 16px !important;
}

.form-container .card-modern .flex .btn-form-primary,
.form-container .card-modern .flex .btn-form-secondary {
    margin: 0;
}

/* Add gap between buttons - margin-left on second button */
.form-container .card-modern .flex .btn-form-secondary + .btn-form-primary {
    margin-left: 16px;
}

/* Edit Agreement Form Buttons - Matching Login Page Design */
.form-container .card-modern .btn-form-primary {
    height: 44px;
    padding: 0 20px;
    background: #4A6DD5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
    box-shadow: 0 4px 6px -1px rgba(74, 109, 213, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    text-decoration: none;
}

.form-container .card-modern .btn-form-primary:hover {
    background: #3B5BBF;
    box-shadow: 0 4px 6px -1px rgba(74, 109, 213, 0.4);
    transform: translateY(-1px);
}

.form-container .card-modern .btn-form-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(74, 109, 213, 0.3);
}

.form-container .card-modern .btn-form-primary:focus-visible {
    outline: 2px solid #4A6DD5;
    outline-offset: 2px;
}

.form-container .card-modern .btn-form-secondary {
    height: 44px;
    padding: 0 20px;
    background: white;
    color: #374151;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    text-decoration: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.form-container .card-modern .btn-form-secondary:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.form-container .card-modern .btn-form-secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.form-container .card-modern .btn-form-secondary:focus-visible {
    outline: 2px solid #4A6DD5;
    outline-offset: 2px;
}

.form-container .card-modern .btn-form-primary i,
.form-container .card-modern .btn-form-secondary i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Responsive Form Container Padding */
@media (max-width: 768px) {
    .form-container .card-modern {
        padding-top: 24px;
        padding-right: 24px;
        padding-bottom: 24px;
        padding-left: 24px;
    }
}

@media (max-width: 640px) {
    .form-container .card-modern {
        padding-top: 16px;
        padding-right: 16px;
        padding-bottom: 16px;
        padding-left: 16px;
    }
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-error {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-neutral {
    background: #F3F4F6;
    color: #4B5563;
}

/* Table Styles */
.table-modern {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
}

.table-modern thead {
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

.table-modern th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    padding: 12px 16px;
    text-align: left;
}

.table-modern td {
    padding: 16px;
    font-size: 14px;
    color: #111827;
    border-bottom: 1px solid #F3F4F6;
}

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

.table-modern tbody tr:hover {
    background: #F9FAFB;
    transition: background 150ms ease;
}

/* Navigation Styles */
.nav-sidebar {
    width: 240px;
    background: #FAFBFC;
    border-right: 1px solid #E5E7EB;
    position: fixed;
    top: 64px;
    left: 0;
    height: calc(100vh - 64px);
    padding: 16px 12px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 40;
    transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1024px) {
    .nav-sidebar.sidebar-collapsed {
        width: 64px;
        padding: 16px 8px;
    }
}

@media (max-width: 1023px) {
    .nav-sidebar {
        width: 280px;
        transform: translateX(-100%);
    }
    
    .nav-sidebar.translate-x-0 {
        transform: translateX(0);
    }
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    margin-bottom: 4px;
    transition: all 150ms ease;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

@media (min-width: 1024px) {
    .sidebar-collapsed .nav-item {
        padding: 10px;
        justify-content: center;
    }
    
    .sidebar-collapsed .nav-item:hover::after {
        content: attr(title);
        position: absolute;
        left: calc(100% + 8px);
        background: #1F2937;
        color: white;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 13px;
        white-space: nowrap;
        z-index: 100;
        pointer-events: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar-collapsed .nav-item:hover::before {
        content: '';
        position: absolute;
        left: calc(100% + 4px);
        border: 4px solid transparent;
        border-right-color: #1F2937;
        z-index: 101;
        pointer-events: none;
    }
}

.nav-item:hover {
    background: #F9FAFB;
    color: #374151;
}

.nav-item.active {
    background: #F3F4F6;
    color: #4A6DD5;
    border-left: 3px solid #4A6DD5;
    padding-left: 9px;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    color: #9CA3AF;
    flex-shrink: 0;
}

.nav-item-text {
    transition: opacity 200ms ease;
}

@media (min-width: 1024px) {
    .sidebar-collapsed .nav-icon {
        margin-right: 0;
    }
    
    .sidebar-collapsed .nav-item-text {
        opacity: 0;
        width: 0;
        overflow: hidden;
    }
}

.nav-item.active .nav-icon {
    color: #4A6DD5;
}

.nav-section-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9CA3AF;
    padding: 16px 12px 8px;
    margin-top: 16px;
    transition: opacity 200ms ease;
}

@media (min-width: 1024px) {
    .sidebar-collapsed .nav-section-header {
        opacity: 0;
        height: 0;
        padding: 0;
        margin: 0;
        overflow: hidden;
    }
}

.nav-section-header:first-child {
    margin-top: 0;
}

/* Top Navbar */
.navbar-top {
    height: 64px;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

/* Navbar Left Section (Hamburger + Logo) */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 64px;
    margin-left: 0;
}

/* Hamburger Menu Button */
.hamburger-button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 150ms ease;
    padding: 0;
    margin-right: 0;
}

.hamburger-button:hover {
    background: #F3F4F6;
}

.hamburger-button:active {
    background: #E5E7EB;
    transform: scale(0.95);
    transition: transform 100ms ease;
}

.hamburger-icon {
    width: 20px;
    height: 20px;
    color: #374151;
    stroke-width: 2;
}

/* Navbar Logo */
.navbar-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    padding: 8px;
    margin-left: 12px;
}

.navbar-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}

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

/* User Menu Button */
.user-menu-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 150ms ease;
    height: 40px;
}

.user-menu-button:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.user-menu-button:active,
.user-menu-button[aria-expanded="true"] {
    background: #F3F4F6;
    border-color: #4A6DD5;
    box-shadow: 0 0 0 3px rgba(74, 109, 213, 0.1);
}

/* User Avatar with Gradient */
.user-avatar-gradient {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A6DD5 0%, #3B5BBF 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 0 0 2px rgba(74, 109, 213, 0.15);
    flex-shrink: 0;
}

.user-name-text {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.user-chevron {
    width: 16px;
    height: 16px;
    color: #9CA3AF;
    transition: transform 200ms ease;
    flex-shrink: 0;
}

.user-chevron.rotate-180 {
    transform: rotate(180deg);
}

/* User Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 8px;
    min-width: 200px;
    z-index: 100;
    animation: fadeInDown 200ms ease;
}

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

/* Dropdown User Info Section */
.dropdown-user-info {
    padding: 12px;
    border-bottom: 1px solid #F3F4F6;
    margin-bottom: 8px;
}

.dropdown-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.dropdown-user-email {
    font-size: 12px;
    color: #6B7280;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: background 150ms ease;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
}

.dropdown-item i {
    width: 16px;
    height: 16px;
    color: #6B7280;
}

.dropdown-item:hover {
    background: #F3F4F6;
}

.dropdown-item-danger {
    color: #EF4444;
}

.dropdown-item-danger i {
    color: #EF4444;
}

.dropdown-item-danger:hover {
    background: #FEE2E2;
}

.dropdown-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 8px 0;
}

.user-menu {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 150ms ease;
}

.user-menu:hover {
    background: #F9FAFB;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #6366F1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-right: 8px;
}

/* Main Content */
.main-content {
    margin-left: 240px;
    margin-top: 64px;
    padding: 32px;
    background: #FAFBFC;
    min-height: calc(100vh - 64px);
    transition: margin-left 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1024px) {
    .main-content {
        margin-left: 240px;
    }
    
    .main-content-collapsed {
        margin-left: 64px;
    }
}

@media (max-width: 1023px) {
    .main-content {
        margin-left: 0;
    }
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header Action Button */
.header-action-button {
    background: #4A6DD5;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 200ms ease;
    box-shadow: 0 1px 2px 0 rgba(74, 109, 213, 0.3);
    border: none;
    cursor: pointer;
    letter-spacing: normal;
}

.header-action-button:hover {
    background: #3B5BBF;
    box-shadow: 0 4px 6px -1px rgba(74, 109, 213, 0.4);
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.header-action-button i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.page-description {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.5;
    margin-bottom: 0;
}

.page-welcome {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 4px;
    font-weight: 400;
}

.page-quick-stats {
    font-size: 13px;
    color: #9CA3AF;
    margin-top: 4px;
    margin-bottom: 0;
}

.page-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.page-date-time {
    font-size: 13px;
    color: #9CA3AF;
    margin: 0;
}

.page-description {
    font-size: 14px;
    color: #6B7280;
    margin-top: 4px;
}

/* Animations */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slide-in-right {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* Table Skeleton Loader */
.agreements-table tbody tr .skeleton {
    margin: 0;
    display: inline-block;
}

.agreements-table tbody tr td {
    padding: 16px 20px;
    vertical-align: middle;
}

.agreements-table tbody tr .agreements-actions .skeleton {
    display: inline-block;
    margin-right: 8px;
}

.spinner {
    border: 3px solid #F3F4F6;
    border-top-color: #6366F1;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 600ms linear infinite;
}

/* Empty State */
.empty-state {
    padding: 80px 24px;
    text-align: center;
    background: #FAFBFC;
    border: 2px dashed #E5E7EB;
    border-radius: 12px;
    margin-top: 20px;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    color: #D1D5DB;
    margin: 0 auto 20px;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.empty-state-description {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-button {
    background: #6366F1;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 150ms ease;
}

.empty-state-button:hover {
    background: #4F46E5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Dashboard Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 200ms ease;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.stat-card:hover {
    box-shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.stat-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    pointer-events: none;
}

.stat-icon-svg {
    width: 24px;
    height: 24px;
}

.stat-icon-indigo {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
}

.stat-icon-indigo .stat-icon-svg {
    color: #6366F1;
}

.stat-icon-amber {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.stat-icon-amber .stat-icon-svg {
    color: #F59E0B;
}

.stat-icon-green {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
}

.stat-icon-green .stat-icon-svg {
    color: #10B981;
}

.stat-icon-blue {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
}

.stat-icon-blue .stat-icon-svg {
    color: #3B82F6;
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    margin-bottom: 8px;
    text-transform: none;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 4px;
    display: block;
}

.stat-number-amber {
    color: #F59E0B;
}

.stat-number-green {
    color: #10B981;
}

.stat-number-blue {
    color: #3B82F6;
}

/* Stat Trend Indicators */
.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 12px;
}

.stat-trend-icon {
    width: 14px;
    height: 14px;
}

.stat-trend-text {
    color: #6B7280;
    font-weight: 400;
}

.stat-trend-up {
    color: #10B981;
}

.stat-trend-up .stat-trend-text {
    color: #10B981;
}

.stat-trend-down {
    color: #EF4444;
}

.stat-trend-down .stat-trend-text {
    color: #EF4444;
}

.stat-trend-neutral {
    color: #6B7280;
}

/* Section Card */
.section-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    margin-top: 32px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Table Scroll Container */
.overflow-x-auto {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 #F3F4F6;
}

.overflow-x-auto::-webkit-scrollbar {
    height: 8px;
}

.overflow-x-auto::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

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

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.section-link {
    font-size: 14px;
    font-weight: 500;
    color: #4A6DD5;
    text-decoration: none;
    transition: color 150ms ease;
}

.section-link:hover {
    color: #3B5BBF;
}


/* Toast Notification System */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    max-width: 420px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Toast Base Styles */
.toast {
    background: white;
    border: 1px solid #E5E7EB;
    border-left: 4px solid;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 64px;
    pointer-events: auto;
    animation: toast-slide-in 300ms ease-out;
    transition: opacity 200ms ease-out;
}

.toast.toast-exiting {
    opacity: 0;
    transform: translateX(100%);
}

/* Toast Icon Section */
.toast-icon-section {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon-section svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Toast Content Section */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.toast-message {
    font-size: 14px;
    font-weight: 400;
    color: #6B7280;
    line-height: 1.5;
}

/* Toast Close Button */
.toast-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    align-self: flex-start;
    transition: all 150ms ease;
    color: #9CA3AF;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #6B7280;
}

.toast-close:focus {
    outline: 2px solid #6366F1;
    outline-offset: 2px;
}

.toast-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Success Toast */
.toast-success {
    border-color: #D1FAE5;
    border-left-color: #10B981;
}

.toast-success .toast-icon-section {
    background: #D1FAE5;
}

.toast-success .toast-icon-section svg {
    stroke: #10B981;
}

/* Error Toast */
.toast-error {
    border-color: #FEE2E2;
    border-left-color: #EF4444;
}

.toast-error .toast-icon-section {
    background: #FEE2E2;
}

.toast-error .toast-icon-section svg {
    stroke: #EF4444;
}

/* Warning Toast */
.toast-warning {
    border-color: #FEF3C7;
    border-left-color: #F59E0B;
}

.toast-warning .toast-icon-section {
    background: #FEF3C7;
}

.toast-warning .toast-icon-section svg {
    stroke: #F59E0B;
}

/* Info Toast */
.toast-info {
    border-color: #DBEAFE;
    border-left-color: #3B82F6;
}

.toast-info .toast-icon-section {
    background: #DBEAFE;
}

.toast-info .toast-icon-section svg {
    stroke: #3B82F6;
}

/* Simple Toast (Title Only) */
.toast.toast-simple {
    padding: 14px 18px;
    min-height: 56px;
}

.toast.toast-simple .toast-content {
    justify-content: center;
}

/* Toast with Action Button */
.toast-action {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #E5E7EB;
}

.toast-action-button {
    background: transparent;
    border: none;
    color: #6366F1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 150ms ease;
}

.toast-action-button:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Loading/Progress Toast */
.toast-loading .toast-icon-section {
    animation: spin 1s linear infinite;
}

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

/* Toast Animation */
@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        width: calc(100% - 32px);
    }

    .toast {
        padding: 14px 16px;
    }

    .toast.toast-simple {
        padding: 12px 14px;
    }
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 40;
    display: none;
}

.sidebar-overlay.open {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-sidebar {
        transform: translateX(-100%);
        transition: transform 300ms ease-in-out;
        z-index: 50;
    }
    
    .nav-sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
    }

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

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

@media (max-width: 768px) {
    .user-name-text {
        display: none;
    }

    .navbar-logo {
        width: 40px;
        height: 40px;
    }
}

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

    .main-content {
        padding: 16px;
    }

    .page-title {
        font-size: 24px;
    }

    .page-header {
        margin-bottom: 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .section-card {
        padding: 16px;
    }

    .stat-card {
        min-height: 120px;
        padding: 20px;
    }

    .stat-number {
        font-size: 28px;
    }

    .user-chevron {
        display: none;
    }
}

/* Pagination Styles */
.pagination-wrapper {
    margin-top: 24px;
    padding: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

#agreements-table-container .pagination-wrapper {
    margin-top: 24px;
    padding-top: 24px;
}

.pagination-info {
    display: flex;
    align-items: center;
}

.pagination-text {
    font-size: 14px;
    color: #6B7280;
}

.pagination-text strong {
    color: #111827;
    font-weight: 600;
}

.pagination-text-full {
    display: inline;
}

.pagination-text-short {
    display: none !important;
}

@media (max-width: 640px) {
    .pagination-text-full {
        display: none !important;
    }
    
    .pagination-text-short {
        display: inline !important;
    }
}

.pagination-controls {
    display: flex;
    align-items: center;
}

/* Mobile Responsive Pagination */
@media (max-width: 640px) {
    .pagination-wrapper {
        flex-wrap: nowrap;
        gap: 12px;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .pagination-wrapper::-webkit-scrollbar {
        height: 4px;
    }
    
    .pagination-wrapper::-webkit-scrollbar-track {
        background: #F3F4F6;
        border-radius: 2px;
    }
    
    .pagination-wrapper::-webkit-scrollbar-thumb {
        background: #D1D5DB;
        border-radius: 2px;
    }
    
    .pagination-info {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .pagination-text {
        font-size: 12px;
        white-space: nowrap;
    }
    
    .pagination-controls {
        flex-shrink: 0;
    }
    
    nav.pagination,
    .pagination {
        justify-content: flex-end !important;
        width: auto !important;
        flex-shrink: 0 !important;
    }
    
    nav.pagination > a,
    nav.pagination > span,
    .pagination > a,
    .pagination > span {
        min-width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
        padding: 0 6px !important;
    }
}

nav.pagination,
.pagination {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-wrap: wrap !important;
    list-style: none !important;
    width: auto !important;
    max-width: 100% !important;
}

nav.pagination > *,
.pagination > * {
    flex-shrink: 0;
}

nav.pagination > a,
nav.pagination > span,
.pagination > a,
.pagination > span {
    min-width: 36px !important;
    width: auto !important;
    height: 36px !important;
    padding: 0 8px !important;
    margin: 0 !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 6px !important;
    background: white !important;
    color: #6B7280 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 150ms ease !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    cursor: pointer;
    white-space: nowrap;
}

nav.pagination > a:hover,
.pagination > a:hover {
    background: #F9FAFB !important;
    border-color: #D1D5DB !important;
    color: #374151 !important;
    text-decoration: none !important;
}

nav.pagination > span.active,
.pagination > span.active {
    background: #4A6DD5 !important;
    color: white !important;
    border-color: #4A6DD5 !important;
    font-weight: 600 !important;
}

nav.pagination > span.disabled,
.pagination > span.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: #F9FAFB !important;
    pointer-events: none !important;
}

nav.pagination > a i,
nav.pagination > span i,
.pagination > a i,
.pagination > span i {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    display: block !important;
    margin: 0 !important;
}

/* Textarea */
textarea.form-input {
    min-height: 120px;
    padding: 12px;
    resize: vertical;
}

/* Select */
select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 36px;
    appearance: none;
}

@media (max-width: 640px) {
    .main-content {
        padding: 16px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .container-custom {
        padding: 0 16px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* ============================================
   LOGIN PAGE STYLES - Modern Enterprise Design
   ============================================ */

/* Page Container */
body.login-page-body {
    background: #FAFBFC;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.login-container {
    min-height: 100vh;
    display: flex;
    position: relative;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Left Panel (Desktop Only) */
.login-left-panel {
    display: none;
    width: 50%;
    background: linear-gradient(135deg, #4A6DD5 0%, #3B5BBF 100%);
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .login-left-panel {
        display: block;
    }
}

.login-left-content {
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    max-width: 500px;
}

.login-left-heading {
    font-size: 36px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.login-left-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 0;
}

.login-left-features {
    margin-top: 40px;
    list-style: none;
    padding: 0;
}

.login-left-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
}

.login-left-feature-item:last-child {
    margin-bottom: 0;
}

.login-left-feature-icon {
    width: 20px;
    height: 20px;
    color: white;
    flex-shrink: 0;
}

/* Right Panel (Login Card) */
.login-right-panel {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #FFFFFF;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .login-right-panel {
        width: 50%;
        background: #FFFFFF;
    }
}

/* Login Card */
.login-card {
    width: 100%;
    max-width: 440px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(74, 109, 213, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 48px 40px;
    animation: loginCardFadeIn 400ms ease 100ms both;
    max-height: calc(100vh - 48px);
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    body.login-page-body {
        overflow-x: hidden;
        position: relative;
    }
    
    .login-container {
        min-height: 100vh;
        overflow-x: hidden;
    }
    
    .login-card {
        padding: 24px 20px;
        max-width: 100%;
        max-height: none;
        width: 100%;
        box-sizing: border-box;
    }
    
    .login-right-panel {
        padding: 16px;
        align-items: flex-start;
        padding-top: 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .login-card-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .login-form-group {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .login-options-row {
        flex-wrap: wrap;
        gap: 12px;
    }
}

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

.login-card-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Logo Section */
.login-logo-section {
    margin-bottom: 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.login-logo-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(74, 109, 213, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.login-logo-img {
    width: 96px;
    height: 96px;
    display: block;
    margin: 0 auto 20px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    object-fit: contain;
    position: relative;
    z-index: 1;
    animation: loginLogoFadeIn 600ms ease 200ms both;
}

@media (min-width: 769px) and (max-width: 1024px) {
    .login-logo-img {
        width: 88px;
        height: 88px;
    }
}

@media (max-width: 768px) {
    .login-logo-img {
        width: 80px;
        height: 80px;
    }
}

@keyframes loginLogoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-company-name {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

@media (min-width: 769px) and (max-width: 1024px) {
    .login-company-name {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .login-company-name {
        font-size: 19px;
    }
}

.login-tagline {
    font-size: 15px;
    color: #6B7280;
    text-align: center;
    margin: 0;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .login-tagline {
        font-size: 14px;
    }
}

/* Header Section */
.login-header {
    margin-bottom: 32px;
    text-align: center;
}

.login-welcome-text {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .login-welcome-text {
        font-size: 24px;
    }
}

.login-subtitle {
    font-size: 15px;
    color: #6B7280;
    line-height: 1.5;
    margin: 0;
}

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

.login-form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

.login-form-input {
    height: 44px;
    padding: 0 14px;
    background: white;
    border: 1.5px solid #D1D5DB;
    border-radius: 8px;
    font-size: 15px;
    color: #111827;
    transition: all 200ms ease;
    width: 100%;
    max-width: 100%;
    font-family: inherit;
    box-sizing: border-box;
}

.login-form-input::placeholder {
    color: #9CA3AF;
    font-size: 15px;
}

.login-form-input:focus {
    outline: none;
    border: 2px solid #4A6DD5;
    box-shadow: 0 0 0 3px rgba(74, 109, 213, 0.15);
    background: #FAFBFC;
}

.login-form-input-error {
    border: 2px solid #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.login-form-error {
    font-size: 13px;
    color: #EF4444;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-error-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Password Field */
.login-password-wrapper {
    position: relative;
}

.login-password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    transition: color 150ms ease;
}

.login-password-toggle:hover {
    color: #6B7280;
}

.login-password-icon {
    width: 18px;
    height: 18px;
}

/* Remember Me & Forgot Password Row */
.login-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0;
}

.login-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.login-checkbox {
    width: 18px;
    height: 18px;
    border: 1.5px solid #D1D5DB;
    border-radius: 4px;
    background: white;
    transition: all 150ms ease;
    cursor: pointer;
    appearance: none;
    position: relative;
    flex-shrink: 0;
}

.login-checkbox:checked {
    background: #4A6DD5;
    border-color: #4A6DD5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-size: 12px 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.login-checkbox:focus {
    outline: 2px solid #4A6DD5;
    outline-offset: 2px;
}

.login-checkbox-label-text {
    font-size: 14px;
    color: #374151;
    font-weight: 400;
}

.login-forgot-link {
    font-size: 14px;
    font-weight: 500;
    color: #4A6DD5;
    text-decoration: none;
    transition: color 150ms ease;
}

.login-forgot-link:hover {
    color: #3B5BBF;
    text-decoration: underline;
}

/* Sign In Button */
.login-submit-btn {
    width: 100%;
    height: 44px;
    background: #4A6DD5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
    box-shadow: 0 4px 6px -1px rgba(74, 109, 213, 0.3);
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.login-submit-btn:hover:not(:disabled) {
    background: #3B5BBF;
    box-shadow: 0 4px 6px -1px rgba(74, 109, 213, 0.4);
    transform: translateY(-1px);
}

.login-submit-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(74, 109, 213, 0.3);
}

.login-submit-btn:disabled {
    background: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.login-submit-btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-submit-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-submit-spinner {
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

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

/* Footer */
.login-footer {
    margin-top: 32px;
    text-align: center;
}

.login-footer-text {
    font-size: 13px;
    color: #9CA3AF;
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .login-container {
        background: linear-gradient(to bottom, #FAFBFC, #F3F4F6);
    }
    
    .login-right-panel {
        padding: 16px;
    }
    
    .login-card {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
}

/* Accessibility - Focus States */
.login-form-input:focus-visible,
.login-checkbox:focus-visible,
.login-submit-btn:focus-visible,
.login-forgot-link:focus-visible {
    outline: 2px solid #4A6DD5;
    outline-offset: 2px;
}

/* Keyboard Navigation */
.login-submit-btn:focus-visible {
    outline: 2px solid #4A6DD5;
    outline-offset: 2px;
}

/* ============================================
   AGREEMENT DETAILS PAGE STYLES
   ============================================ */

/* Page Header Actions */
.page-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Back Button */
.btn-back {
    background: white;
    border: 1px solid #E5E7EB;
    color: #374151;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 150ms ease;
    cursor: pointer;
}

.btn-back:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

/* Edit Button */
.btn-edit {
    background: #4A6DD5;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 150ms ease;
    box-shadow: 0 1px 2px 0 rgba(74, 109, 213, 0.3);
}

.btn-edit:hover {
    background: #3B5BBF;
    box-shadow: 0 4px 6px -1px rgba(74, 109, 213, 0.4);
}

/* Success Alert */
.agreement-success-alert {
    background: #D1FAE5;
    border: 1px solid #A7F3D0;
    border-left: 4px solid #10B981;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-icon {
    width: 20px;
    height: 20px;
    color: #10B981;
    flex-shrink: 0;
}

.alert-title {
    font-size: 14px;
    font-weight: 600;
    color: #065F46;
    margin-bottom: 2px;
}

.alert-message {
    font-size: 14px;
    color: #047857;
}

.alert-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 150ms ease;
    flex-shrink: 0;
}

.alert-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Agreement Details Grid */
.agreement-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1200px;
}

@media (max-width: 1024px) {
    .agreement-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Agreement Detail Card */
.agreement-detail-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.agreement-card-full-width {
    grid-column: span 2;
}

@media (max-width: 1024px) {
    .agreement-card-full-width {
        grid-column: span 1;
    }
}

/* Card Section Header */
.card-section-header {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #F3F4F6;
}

/* Data Rows */
.data-rows {
    display: grid;
    gap: 16px;
}

/* Data Item */
.data-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Data Label */
.data-label {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Data Value */
.data-value {
    font-size: 15px;
    font-weight: 400;
    color: #111827;
    word-break: break-word;
}

/* Email Value */
.data-value-email {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4A6DD5;
}

.email-link {
    color: #4A6DD5;
    text-decoration: none;
    transition: color 150ms ease;
}

.email-link:hover {
    color: #3B5BBF;
    text-decoration: underline;
}

/* Phone Value */
.data-value-phone {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Payment Value */
.data-value-payment {
    font-size: 18px;
    font-weight: 600;
}

.payment-amount {
    color: #111827;
}

/* Date Value */
.data-value-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6B7280;
    font-size: 14px;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge-pending {
    background: #FEF3C7;
    color: #92400E;
}

.status-badge-completed {
    background: #D1FAE5;
    color: #065F46;
}

.status-badge-expired {
    background: #FEE2E2;
    color: #991B1B;
}

.status-badge-neutral {
    background: #F3F4F6;
    color: #4B5563;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #F59E0B;
    display: inline-block;
}

/* Action Buttons Layout */
.action-buttons-layout {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Primary Action Button */
.btn-action-primary {
    background: #4A6DD5;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    transition: all 200ms ease;
    box-shadow: 0 1px 2px 0 rgba(74, 109, 213, 0.3);
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
}

.btn-action-primary:hover {
    background: #3B5BBF;
    box-shadow: 0 4px 6px -1px rgba(74, 109, 213, 0.4);
}

/* Secondary Action Button */
.btn-action-secondary {
    background: white;
    border: 1px solid #E5E7EB;
    color: #374151;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 200ms ease;
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
}

.btn-action-secondary:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

/* Link Container */
.link-container {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Link Text */
.link-text {
    font-size: 14px;
    color: #4A6DD5;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    flex: 1;
    word-break: break-all;
    user-select: all;
}

/* Link Copy Button */
.link-copy-button {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: white;
    border: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 150ms ease;
    flex-shrink: 0;
}

.link-copy-button:hover {
    background: #F3F4F6;
}

.link-copy-button:active {
    transform: scale(0.95);
}

.link-copy-icon {
    width: 16px;
    height: 16px;
    color: #6B7280;
    transition: color 200ms ease;
}

/* Documents List */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #F9FAFB;
}

.document-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.document-icon {
    color: #9CA3AF;
    flex-shrink: 0;
}

.document-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 2px;
}

.document-filename {
    font-size: 12px;
    color: #6B7280;
}

.document-size {
    font-size: 12px;
    color: #6B7280;
    flex-shrink: 0;
}

/* ============================================
   AGREEMENTS LIST PAGE STYLES
   ============================================ */

/* New Agreement Button */
.btn-new-agreement {
    background: #4A6DD5;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 200ms ease;
    box-shadow: 0 1px 2px 0 rgba(74, 109, 213, 0.3);
    border: none;
    cursor: pointer;
    letter-spacing: normal;
}

.btn-new-agreement:hover {
    background: #3B5BBF;
    box-shadow: 0 4px 6px -1px rgba(74, 109, 213, 0.4);
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.btn-new-agreement i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Search and Filter Container */
.agreements-search-container {
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.agreements-search-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.agreements-search-input-wrapper {
    flex: 1;
    position: relative;
}

.agreements-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #9CA3AF;
    pointer-events: none;
    z-index: 1;
}

.agreements-search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 40px;
    background: white;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    transition: all 150ms ease;
    box-sizing: border-box;
}

.agreements-search-input:focus {
    outline: none;
    border: 2px solid #4A6DD5;
    box-shadow: 0 0 0 3px rgba(74, 109, 213, 0.1);
}

.agreements-status-select {
    width: 180px;
    height: 44px;
    padding: 0 40px 0 16px;
    background: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    border: 1.5px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    transition: all 150ms ease;
    cursor: pointer;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.agreements-status-select:focus {
    outline: none;
    border: 2px solid #4A6DD5;
    box-shadow: 0 0 0 3px rgba(74, 109, 213, 0.1);
}

/* Agreements Table */
.agreements-table {
    width: 100%;
    border-collapse: collapse;
}

.agreements-table thead {
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

.agreements-th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    padding: 12px 16px;
    text-align: left;
}

.agreements-th.text-right {
    text-align: right;
}

.agreements-table tbody tr {
    border-bottom: 1px solid #E5E7EB;
    transition: background-color 150ms ease;
}

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

.agreements-table tbody td {
    padding: 16px;
    font-size: 14px;
    vertical-align: middle;
}

.agreements-table tbody td.text-right {
    text-align: right;
    padding-right: 16px;
}

/* Action Buttons */
.agreements-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

.btn-action-view,
.btn-action-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: #4A6DD5;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 150ms ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-action-view:hover,
.btn-action-edit:hover {
    background: #F3F4F6;
    text-decoration: none;
    color: #4A6DD5;
}

.btn-action-view i,
.btn-action-edit i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Loading Spinner */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .agreements-search-container {
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
    }
    
    .agreements-search-wrapper {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
        justify-content: flex-start;
    }
    
    .agreements-search-input-wrapper {
        width: 100%;
    }
    
    .agreements-status-select {
        width: 100%;
    }
    
    .agreements-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }
    
    .btn-action-view,
    .btn-action-edit {
        width: 100%;
        justify-content: center;
    }
    
    .agreement-details-grid {
        padding: 16px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .page-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .btn-back,
    .btn-edit {
        flex: 1;
        min-width: 120px;
    }
    
    .action-buttons-layout {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        gap: 8px;
    }
    
    .action-buttons-layout form.inline-block,
    .action-buttons-layout .inline-block {
        width: 100%;
        max-width: 100%;
        display: block;
    }
    
    .btn-action-primary,
    .btn-action-secondary {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
    
    .link-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .link-copy-button {
        width: 100%;
        height: 40px;
    }
}

