/**
 * NDIS Intake Manager - All Styles
 * Premium SaaS Design System
 */

body {
    background: white !important;
}

:root {
    --primary: #14b8a6;
    --primary-dark: #0d9488;
    --primary-light: #5eead4;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease-in-out;
}

/* ============================================
   CRM INTERFACE
   ============================================ */

.ndis-crm {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    margin: 20px auto;
    max-width: 1600px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ndis-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 32px 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.ndis-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.ndis-header h2 {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.ndis-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.ndis-tab {
    padding: 12px 24px;
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.ndis-tab:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.ndis-tab.active {
    background: white;
    color: #14b8a6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-color: white;
}

.ndis-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Stats */
.ndis-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ndis-stat {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
}

.ndis-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ndis-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.ndis-stat-label {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

/* Card */
.ndis-card {
    background: transparent;
    border: none;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ndis-card h3,
.ndis-card h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

/* Table */
.ndis-table {
    width: 100%;
    border-collapse: collapse;
}

.ndis-table thead {
    background: var(--gray-50);
}

.ndis-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ndis-table td {
    padding: 16px;
    border-top: 1px solid var(--gray-200);
}

.ndis-table tbody tr {
    transition: background 0.2s;
}

.ndis-table tbody tr:hover {
    background: var(--gray-50);
}

/* Forms */
.ndis-form-group {
    margin-bottom: 20px;
}

.ndis-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.ndis-form-group small {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

.ndis-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.ndis-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
    font-family: inherit;
}

.ndis-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.ndis-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.ndis-btn-primary {
    background: var(--primary);
    color: white;
}

.ndis-btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.ndis-btn-success {
    background: var(--success);
    color: white;
}

.ndis-btn-success:hover {
    background: #059669;
}

.ndis-btn-danger {
    background: var(--danger);
    color: white;
}

.ndis-btn-danger:hover {
    background: #dc2626;
}

.ndis-btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
}

.ndis-btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.ndis-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.ndis-btn-block {
    width: 100%;
    justify-content: center;
}

.ndis-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Badges */
.ndis-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ndis-badge-draft {
    background: #fef3c7;
    color: #92400e;
}

.ndis-badge-submitted {
    background: #dbeafe;
    color: #1e40af;
}

.ndis-badge-in-review {
    background: #e0e7ff;
    color: #3730a3;
}

.ndis-badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.ndis-badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.ndis-badge-completed {
    background: #d1fae5;
    color: #065f46;
}

/* Edit Layout */
.ndis-edit-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.ndis-info-group {
    margin-bottom: 16px;
}

.ndis-info-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.ndis-btn-copy {
    padding: 8px 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

.ndis-btn-copy:hover {
    background: var(--gray-200);
}

.ndis-btn-copy-icon {
    padding: 8px 12px !important;
    background: white !important;
    border: 2px solid var(--gray-300) !important;
    border-radius: var(--radius) !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    min-width: 44px !important;
}

.ndis-btn-copy-icon:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
    transform: scale(1.05);
}

/* Form Manager */
.ndis-form-manager {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ndis-form-manager .ndis-input {
    flex: 1;
    min-width: 250px;
}

.ndis-form-manager-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    margin-bottom: 24px;
    align-items: end;
}

.ndis-form-manager-grid .ndis-form-group {
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .ndis-form-manager-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Builder */
#ndis-form-builder {
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    padding: 24px;
    min-height: 400px;
    background: var(--gray-50);
    margin-bottom: 24px;
}

.ndis-field-item {
    background: white;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}

.ndis-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ndis-field-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-900);
}

.ndis-field-actions {
    display: flex;
    gap: 8px;
}

.ndis-field-actions button {
    padding: 4px 8px;
    font-size: 12px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    cursor: pointer;
}

.ndis-field-actions button:hover {
    background: var(--gray-200);
}

.ndis-field-preview {
    color: var(--gray-500);
    font-size: 14px;
}

/* Messages */
.ndis-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.ndis-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--danger);
}

/* ============================================
   PORTAL
   ============================================ */

/* Portal Access Card Styling */
.ndis-portal-access-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%) !important;
    border: 2px solid var(--gray-200) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.ndis-portal-access-card h4 {
    color: var(--gray-900);
    font-size: 18px !important;
    font-weight: 700 !important;
    padding-bottom: 12px;
    border-bottom: 3px solid #14b8a6;
}

.ndis-portal-access-card .ndis-info-group {
    background: white;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    margin-bottom: 14px;
    transition: all 0.2s;
}

.ndis-portal-access-card .ndis-info-group:hover {
    border-color: #14b8a6;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.1);
}

.ndis-portal-access-card .ndis-info-group label {
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-700);
}

.ndis-portal {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ndis-portal-header {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ndis-portal-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: var(--gray-900);
}

.ndis-portal-header p {
    margin: 0;
    color: var(--gray-500);
}

.ndis-portal-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 20px;
}

.ndis-login-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 20px;
    padding: 50px 45px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 440px;
    position: relative;
    overflow: hidden;
}

.ndis-login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.ndis-login-logo {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.ndis-login-icon {
    font-size: 56px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.ndis-login-card h2 {
    font-size: 28px;
    margin: 0 0 12px 0;
    text-align: center;
    color: white;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ndis-login-subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
    margin-bottom: 32px !important;
    text-align: center;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

.ndis-login-card .ndis-form-group {
    position: relative;
    z-index: 1;
}

.ndis-login-card .ndis-form-group label {
    color: white;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.ndis-login-card .ndis-input {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 14px 16px;
    font-size: 15px;
}

.ndis-login-card .ndis-input:focus {
    background: white;
    border-color: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.ndis-login-card .ndis-btn-primary {
    background: white;
    color: var(--primary);
    font-weight: 700;
    padding: 14px 24px;
    margin-top: 8px;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ndis-login-card .ndis-btn-primary:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#ndis-login-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

#ndis-login-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

#ndis-login-message.success {
    background: rgba(16, 185, 129, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.ndis-portal-form {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ndis-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    padding-left: 32px;
    padding-right: 32px;
    border-top: 2px solid var(--gray-200);
}

.ndis-required {
    color: var(--danger);
    font-weight: bold;
}

.ndis-radio-label,
.ndis-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--gray-50);
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ndis-radio-label:hover,
.ndis-checkbox-label:hover {
    background: white;
    border-color: var(--primary);
}

.ndis-portal-success {
    background: #d1fae5;
    color: #065f46;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.ndis-portal-success h3 {
    font-size: 24px;
    margin: 0 0 12px 0;
}

.ndis-portal-info {
    background: #dbeafe;
    color: #1e40af;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.ndis-portal-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

/* ============================================
   PORTAL FORM GRID LAYOUT
   ============================================ */

.ndis-form-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.ndis-form-group-full {
    grid-column: span 6;
}

.ndis-form-group-half {
    grid-column: span 3;
}

.ndis-form-group-third {
    grid-column: span 2;
}

.ndis-required-field .ndis-input,
.ndis-required-field .ndis-select,
.ndis-required-field .ndis-textarea {
    border-color: rgba(239, 68, 68, 0.3) !important;
}

/* ============================================
   ENHANCED BUTTON STYLES
   ============================================ */

.ndis-btn {
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.ndis-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ndis-btn:active {
    transform: translateY(0);
}

.ndis-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.ndis-btn-primary:hover {
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.ndis-btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.ndis-btn-success:hover {
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.ndis-btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

.ndis-btn-danger:hover {
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3);
}

/* ============================================
   CARD ENHANCEMENTS
   ============================================ */

.ndis-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.ndis-card:hover {
    box-shadow: var(--shadow-md);
}

.ndis-card h3 {
    color: var(--gray-900);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #14b8a6;
}

.ndis-card h4 {
    color: var(--gray-800);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

/* ============================================
   TABLE IMPROVEMENTS
   ============================================ */

.ndis-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.ndis-table th {
    background: var(--gray-50);
    padding: 16px;
    text-align: left;
    font-weight: 700;
    color: var(--gray-700);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
}

.ndis-table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-800);
}

.ndis-table tr:last-child td {
    border-bottom: none;
}

.ndis-table tr:hover {
    background: var(--gray-50);
}

/* ============================================
   FORM ENHANCEMENTS
   ============================================ */

.ndis-input,
.ndis-select,
.ndis-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    background: white;
}

.ndis-input:focus,
.ndis-select:focus,
.ndis-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ndis-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

.ndis-form-group small {
    display: block;
    margin-top: 6px;
    color: var(--gray-500);
    font-size: 12px;
}

.ndis-required {
    color: var(--danger);
    margin-left: 4px;
}

/* ============================================
   BADGE IMPROVEMENTS
   ============================================ */

.ndis-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.ndis-badge-draft {
    background: var(--gray-200);
    color: var(--gray-700);
}

.ndis-badge-submitted {
    background: var(--info-light);
    color: #1e40af;
}

.ndis-badge-in-review {
    background: var(--warning-light);
    color: #92400e;
}

.ndis-badge-approved {
    background: var(--success-light);
    color: #065f46;
}

.ndis-badge-rejected {
    background: var(--danger-light);
    color: #991b1b;
}

.ndis-badge-completed {
    background: var(--success);
    color: white;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ndis-card,
.ndis-stat,
.ndis-table tr {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .ndis-edit-layout {
        grid-template-columns: 1fr;
    }
    
    .ndis-stats {
        grid-template-columns: 1fr;
    }
    
    .ndis-form-row {
        grid-template-columns: 1fr;
    }
    
    .ndis-form-grid {
        grid-template-columns: 1fr;
    }
    
    .ndis-form-group-half {
        grid-column: 1 / -1;
    }
    
    .ndis-header {
        padding: 24px 20px;
    }
    
    .ndis-content {
        padding: 20px;
    }
    
    .ndis-tabs {
        gap: 6px;
    }
    
    .ndis-tab {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .ndis-form-group-third {
        grid-column: span 3;
    }
    
    .ndis-dashboard-layout,
    .ndis-settings-grid {
        grid-template-columns: 1fr;
    }
    
    .ndis-portal-info-cards {
        flex-direction: column;
        gap: 12px;
    }
}

/* ============================================
   DASHBOARD CATEGORIES SIDEBAR
   ============================================ */

.ndis-dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.ndis-dashboard-sidebar {
    background: transparent;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.ndis-category-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.ndis-category-btn:hover {
    border-color: #14b8a6;
    background: var(--gray-50);
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.ndis-category-btn.active {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    border-color: #14b8a6;
    box-shadow: var(--shadow-md);
}

.ndis-category-icon {
    font-size: 18px;
}

.ndis-category-text {
    flex: 1;
}

.ndis-category-count {
    background: rgba(0,0,0,0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.ndis-category-btn.active .ndis-category-count {
    background: rgba(255,255,255,0.25);
}

.ndis-category-badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.ndis-category-active {
    background: rgba(59, 130, 246, 0.15);
    color: #1e40af;
}

.ndis-category-successful {
    background: var(--success-light);
    color: #065f46;
}

.ndis-category-unsuccessful {
    background: var(--danger-light);
    color: #991b1b;
}

.ndis-category-potential_lead {
    background: var(--warning-light);
    color: #92400e;
}

.ndis-category-other {
    background: var(--gray-100);
    color: var(--gray-700);
}

.ndis-dashboard-main {
    min-width: 0;
}

/* ============================================
   SETTINGS PAGE GRID
   ============================================ */

.ndis-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
}

.ndis-placeholder-guide {
    background: var(--gray-50);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ndis-placeholder-guide strong {
    color: var(--gray-700);
    font-size: 13px;
    width: 100%;
    margin-bottom: 4px;
}

.ndis-placeholder-guide code {
    background: white;
    border: 1px solid var(--gray-300);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.ndis-placeholder-guide code:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.ndis-email-editor {
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

/* ============================================
   PORTAL REDESIGN
   ============================================ */

.ndis-portal-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    background: linear-gradient(to bottom, #f9fafb 0%, #ffffff 100%);
}

.ndis-portal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 30px 40px;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.ndis-portal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.ndis-portal-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.ndis-portal-logo {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.ndis-logo-icon {
    font-size: 64px;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.ndis-logo-text h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.ndis-logo-text p {
    margin: 4px 0 0 0;
    font-size: 16px;
    opacity: 0.9;
}

.ndis-portal-company-info {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 16px 24px;
    border: 2px solid rgba(255,255,255,0.2);
    margin-top: 20px;
}

.ndis-portal-company-info p {
    margin: 4px 0;
    font-size: 14px;
    opacity: 0.95;
}

.ndis-portal-info-cards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.ndis-info-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 16px 20px;
    flex: 1;
    min-width: 220px;
    border: 2px solid rgba(255,255,255,0.2);
}

.ndis-info-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.ndis-info-value {
    font-size: 16px;
    font-weight: 700;
}

.ndis-portal {
    background: white;
    padding: 40px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.ndis-portal-login {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ndis-login-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.ndis-login-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.ndis-login-card h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    color: var(--gray-900);
}

/* ============================================
   FORM BUILDER IMPROVEMENTS
   ============================================ */

.ndis-form-manager {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.ndis-form-manager select {
    flex: 1;
    min-width: 250px;
}

/* ============================================
   UNIFORM INPUTS WITH !important
   ============================================ */

.ndis-input,
.ndis-select,
.ndis-textarea,
input.ndis-input,
select.ndis-input,
textarea.ndis-input {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid var(--gray-300) !important;
    border-radius: var(--radius) !important;
    font-size: 14px !important;
    transition: var(--transition) !important;
    background: white !important;
    font-family: inherit !important;
    color: var(--gray-900) !important;
}

.ndis-input:focus,
.ndis-select:focus,
.ndis-textarea:focus,
input.ndis-input:focus,
select.ndis-input:focus,
textarea.ndis-input:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

/* ============================================
   UNIFORM BUTTONS WITH PROPER HOVER
   ============================================ */

.ndis-btn,
button.ndis-btn,
a.ndis-btn {
    padding: 12px 24px !important;
    border-radius: var(--radius) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: var(--transition) !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: var(--shadow-sm) !important;
    text-decoration: none !important;
    font-family: inherit !important;
}

.ndis-btn:hover,
button.ndis-btn:hover,
a.ndis-btn:hover {
    transform: scale(1.03);
    transition: transform 0.2s ease;
}

.ndis-btn-primary,
button.ndis-btn-primary,
a.ndis-btn-primary {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important;
    color: white !important;
}

.ndis-btn-primary:hover,
button.ndis-btn-primary:hover,
a.ndis-btn-primary:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
    color: white !important;
    box-shadow: 0 8px 16px rgba(20, 184, 166, 0.3) !important;
}

.ndis-btn-success,
button.ndis-btn-success,
a.ndis-btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%) !important;
    color: white !important;
}

.ndis-btn-success:hover,
button.ndis-btn-success:hover,
a.ndis-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: white !important;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3) !important;
}

.ndis-btn-secondary,
button.ndis-btn-secondary,
a.ndis-btn-secondary {
    background: rgba(20, 184, 166, 0.08) !important;
    color: #14b8a6 !important;
    border: 2px solid #14b8a6 !important;
}

.ndis-btn-secondary:hover,
button.ndis-btn-secondary:hover,
a.ndis-btn-secondary:hover {
    background: rgba(20, 184, 166, 0.15) !important;
    color: #0d9488 !important;
    border-color: #0d9488 !important;
    box-shadow: 0 8px 16px rgba(20, 184, 166, 0.2) !important;
}

.ndis-btn-danger,
button.ndis-btn-danger,
a.ndis-btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%) !important;
    color: white !important;
}

.ndis-btn-danger:hover,
button.ndis-btn-danger:hover,
a.ndis-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: white !important;
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3) !important;
}

.ndis-btn-block {
    width: 100% !important;
    justify-content: center !important;
}

.ndis-btn-large {
    padding: 16px 32px !important;
    font-size: 16px !important;
}

.ndis-btn-sm {
    padding: 8px 16px !important;
    font-size: 13px !important;
}

/* ============================================
   NEW PURPLE THEME - PORTAL HEADER (HR Onboarding Style)
   ============================================ */
.ndis-portal-header-new {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 24px -8px rgba(20, 184, 166, 0.4), 0 4px 12px -4px rgba(0, 0, 0, 0.1);
    gap: 16px;
    flex-wrap: wrap;
    border-radius: 12px 12px 0 0;
}

.ndis-portal-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ndis-portal-logo-img {
    max-height: 50px;
    max-width: 140px;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 10px;
    object-fit: contain;
}

.ndis-portal-logo-icon {
    font-size: 40px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px;
    border-radius: 8px;
    line-height: 1;
}

.ndis-portal-header-title h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.ndis-portal-header-title p {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.ndis-portal-header-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ndis-portal-info-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 120px;
}

.ndis-info-icon {
    font-size: 20px;
    line-height: 1;
    opacity: 0.9;
}

.ndis-info-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    margin-bottom: 3px;
}

.ndis-info-value {
    font-size: 13px;
    color: white;
    font-weight: 500;
    line-height: 1.2;
}

/* ============================================
   NEW PURPLE THEME - CRM HEADER (HR Onboarding Style)
   ============================================ */
.ndis-header-new {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    padding: 14px 20px 16px;
    color: white;
    box-shadow: 0 8px 24px -8px rgba(20, 184, 166, 0.4), 0 4px 12px -4px rgba(0, 0, 0, 0.1);
    margin-bottom: 28px;
    border-radius: 12px;
}

.ndis-header-top {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    gap: 20px;
}

.ndis-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ndis-company-logo {
    max-height: 50px;
    max-width: 140px;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 10px;
    object-fit: contain;
}

.ndis-logo-icon {
    font-size: 40px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px;
    border-radius: 8px;
    line-height: 1;
}

.ndis-header-title h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.ndis-header-title p {
    margin: 2px 0 0 0;
    font-size: 12px;
    opacity: 0.85;
    font-weight: 400;
}

.ndis-header-system-title {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.ndis-header-system-title h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: white;
    text-align: left;
    letter-spacing: -0.3px;
}

.ndis-header-stats-mini {
    display: flex;
    gap: 12px;
}

.ndis-stat-mini-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 110px;
    text-align: center;
    transition: all 0.2s ease;
}

.ndis-stat-mini-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.03);
}

.ndis-stat-mini-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.ndis-stat-mini-value {
    font-size: 24px;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.ndis-header-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ndis-header-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ndis-header-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.ndis-header-btn.active {
    background: white;
    color: #14b8a6;
}

.ndis-header-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.ndis-stat-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ndis-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.2);
}

.ndis-stat-icon {
    font-size: 28px;
    line-height: 1;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.ndis-stat-content {
    flex: 1;
}

.ndis-stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    margin-bottom: 2px;
}

.ndis-stat-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: white;
}

/* ============================================
   PORTAL WRAPPER & FORMS (HR Onboarding Style)
   ============================================ */
.ndis-portal-wrapper {
    max-width: 1100px;
    margin: 16px auto;
    background: transparent;
    box-shadow: none;
    border: 1px solid rgba(20, 184, 166, 0.15);
    border-radius: 12px;
    overflow: visible;
}

.ndis-portal {
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.ndis-portal-content {
    padding: 32px 0 40px;
    max-width: 100%;
    margin: 0 auto;
}

.ndis-portal-content > * {
    padding-left: 32px;
    padding-right: 32px;
}

.ndis-portal-content .ndis-form-section,
.ndis-portal-content .ndis-form-field,
.ndis-portal-content .ndis-progress-section {
    padding-left: 0;
    padding-right: 0;
}

.ndis-portal-success-card {
    background: transparent;
    border-radius: 0;
    padding: 40px 32px;
    box-shadow: none;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
    border: none;
}

.ndis-success-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.ndis-portal-success-card h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
}

.ndis-success-message {
    font-size: 15px;
    color: var(--gray-600);
    margin-bottom: 28px;
    line-height: 1.6;
}

.ndis-success-details {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    text-align: left;
}

.ndis-success-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.ndis-success-item:last-child {
    border-bottom: none;
}

.ndis-success-label {
    font-weight: 600;
    color: var(--gray-700);
}

.ndis-success-value {
    color: var(--gray-900);
    font-weight: 500;
}

.ndis-success-next-steps {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    text-align: left;
}

.ndis-success-next-steps h3 {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.ndis-success-next-steps ul {
    margin: 0;
    padding-left: 24px;
    color: var(--gray-700);
    line-height: 1.8;
}

.ndis-success-next-steps li {
    margin-bottom: 8px;
}

.ndis-success-footer {
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.ndis-success-footer img {
    max-width: 200px;
    max-height: 60px;
    opacity: 0.7;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.ndis-progress-container {
    background: rgba(20, 184, 166, 0.05);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 32px;
    margin-top: 16px;
    border: 1px solid rgba(20, 184, 166, 0.1);
}

.ndis-progress-bar {
    height: 14px;
    background: var(--gray-200);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 10px;
}

.ndis-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border-radius: 20px;
    transition: width 0.3s ease;
    box-shadow: 0 2px 4px rgba(20, 184, 166, 0.3);
}

.ndis-progress-text {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

#ndis-progress-percentage {
    color: #667eea;
    font-size: 16px;
}

/* ============================================
   SAVE PROGRESS MESSAGE
   ============================================ */
.ndis-save-message {
    margin-top: 16px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.ndis-save-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.ndis-save-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   REQUIRED FIELDS NOTICE
   ============================================ */
.ndis-required-fields-notice {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 10px;
    padding: 16px 20px;
    margin: 24px 0;
    display: flex;
    gap: 14px;
    align-items: start;
}

.ndis-required-icon {
    font-size: 24px;
    line-height: 1;
    margin-top: 2px;
}

.ndis-required-text {
    flex: 1;
    font-size: 14px;
    color: #0c4a6e;
    line-height: 1.6;
}

.ndis-required-text strong {
    color: #075985;
}

.ndis-missing-fields-list {
    margin-top: 8px;
    font-size: 13px;
    color: #0369a1;
}

.ndis-missing-fields-list.has-missing {
    padding: 8px 12px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 6px;
    margin-top: 10px;
}

.ndis-missing-field-item {
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ndis-missing-field-item::before {
    content: "→";
    color: #0284c7;
    font-weight: bold;
}

/* ============================================
   RESPONSIVE
   ============================================ */
/* ============================================
   PROFESSIONAL CASES TABLE
   ============================================ */
.ndis-cases-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ndis-cases-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.ndis-cases-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 2px solid var(--gray-300);
}

.ndis-cases-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
    color: var(--gray-800);
}

.ndis-cases-table tbody tr {
    transition: all 0.15s ease;
}

.ndis-cases-table tbody tr:hover {
    background: var(--gray-50);
}

.ndis-case-link {
    color: #14b8a6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}

.ndis-case-link:hover {
    color: #0d9488;
    text-decoration: underline;
}

.ndis-submission-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.15s;
}

.ndis-submission-status.received {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.ndis-submission-status.pending {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.12) 100%);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.ndis-btn-sm {
    padding: 6px 14px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.15s;
    box-shadow: 0 2px 4px rgba(20, 184, 166, 0.2);
}

.ndis-btn-sm:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(20, 184, 166, 0.3);
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */
/* Tablet styles */
@media (max-width: 1024px) {
    .ndis-portal-content {
        padding: 24px 24px 32px;
    }
    
    .ndis-header-system-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .ndis-header-stats-mini {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .ndis-portal-wrapper {
        margin: 8px;
    }
    
    .ndis-portal-header-new {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        border-radius: 12px 12px 0 0;
    }
    
    .ndis-portal-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .ndis-portal-header-right {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .ndis-portal-info-card {
        width: 100%;
        min-width: 0;
    }
    
    .ndis-portal-content {
        padding: 20px 0 32px;
    }
    
    .ndis-portal-content > * {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .ndis-progress-container {
        padding: 16px;
        margin-bottom: 24px;
    }
    
    .ndis-form-row {
        grid-template-columns: 1fr !important;
    }
    
    .ndis-form-actions {
        flex-direction: column;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .ndis-form-actions .ndis-btn-large {
        width: 100%;
    }
    
    .ndis-header-new {
        padding: 16px;
        border-radius: 12px 12px 0 0;
    }
    
    .ndis-header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ndis-header-system-title {
        width: 100%;
    }
    
    .ndis-header-system-title h2 {
        font-size: 16px;
    }
    
    .ndis-header-stats-mini {
        flex-direction: row;
        width: 100%;
    }
    
    .ndis-stat-mini-card {
        flex: 1;
        min-width: 0;
    }
    
    .ndis-header-nav {
        width: 100%;
    }
    
    .ndis-header-btn {
        flex: 1;
        justify-content: center;
    }
    
    .ndis-portal-success-card {
        padding: 32px 20px;
    }
    
    .ndis-portal-success-card h2 {
        font-size: 24px;
    }
    
    .ndis-success-icon {
        width: 64px;
        height: 64px;
        font-size: 36px;
    }
    
    .ndis-cases-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
