/* Reset and base styles */
.taxcare-dashboard {
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.taxcare-dashboard h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 24px 0;
}

/* Tabs styling to match reference */
.tc-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
    margin: 0 0 24px 0;
    position: relative;
}

.tc-tab-button {
    background: transparent;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.tc-tab-button:hover {
    color: #334155;
    background: #f8fafc;
}

.tc-tab-button.active {
    color: #1e293b;
    background: #ffffff;
    border-bottom-color: #3b82f6;
}

.tc-add-button {
    margin-left: auto;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tc-add-button:hover {
    background: #2563eb;
    color: white;
}

.tc-tab-panel { 
    display: none; 
}

.tc-tab-panel.active { 
    display: block; 
}

/* Section header styling */
.tc-section-header {
    margin: 0 0 20px 0;
}

.tc-section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.tc-section-header p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Toolbar styling */
.tc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 20px 0;
    padding: 0;
}

#tc-search-customers {
    width: 300px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
}

#tc-search-customers:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Table styling to match reference */
.tc-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tc-table thead {
    background: #f9fafb;
}

.tc-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.tc-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #1f2937;
}

.tc-table tbody tr:hover {
    background: #f9fafb;
}

.tc-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge styling */
.tc-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-transform: capitalize;
}

.tc-badge-success { 
    background: #dcfce7; 
    color: #166534; 
}

.tc-badge-warning { 
    background: #fef3c7; 
    color: #92400e; 
}

/* Button styling */
.tc-table .button {
    padding: 4px 8px;
    font-size: 12px;
    margin-right: 4px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.tc-table .button:hover {
    text-decoration: none;
}

/* Delete button styling */
.tc-delete-customer {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tc-delete-customer:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Card styling for upload form */
.tc-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tc-card h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
}

/* Upload form styling */
.tc-upload-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 220px);
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.tc-upload-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 56px 48px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
    max-width: 580px;
    width: 100%;
    position: relative;
    backdrop-filter: blur(10px);
    margin: 0 auto; /* ensure horizontal centering even outside flex */
}

.tc-upload-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    border-radius: 20px 20px 0 0;
}

.tc-upload-header {
    margin-bottom: 48px;
    text-align: center;
    position: relative;
}

.tc-upload-header::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

.tc-upload-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.tc-upload-header p {
    font-size: 17px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
}

.tc-upload-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.tc-form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.tc-form-group label {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tc-form-group label::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #3b82f6;
    border-radius: 50%;
    flex-shrink: 0;
}

.tc-select-wrapper {
    position: relative;
}

.tc-form-group select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 16px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    appearance: none;
    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='2.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 20px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 56px;
    font-weight: 500;
    color: #1e293b;
}

.tc-form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.08);
    transform: translateY(-2px);
    background-color: #fafbff;
}

.tc-form-group select:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.tc-form-group input[type="text"],
.tc-form-group input[type="email"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 16px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: #1e293b;
}

.tc-form-group input[type="text"]:focus,
.tc-form-group input[type="email"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.08);
    transform: translateY(-2px);
    background-color: #fafbff;
}

.tc-form-group input[type="text"]:hover,
.tc-form-group input[type="email"]:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.tc-form-group input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Professional file upload area */
.tc-file-upload-area {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    min-height: 120px;
}

.tc-file-upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02) 0%, rgba(139, 92, 246, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tc-file-upload-area:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.15);
}

.tc-file-upload-area:hover::before {
    opacity: 1;
}

.tc-file-upload-area.has-file {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.15);
}

.tc-file-upload-area input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.tc-file-upload-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    gap: 20px;
    height: 100%;
    min-height: 120px;
}

.tc-file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 16px;
    color: #64748b;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tc-file-upload-area:hover .tc-file-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.tc-file-upload-area.has-file .tc-file-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}

.tc-file-text-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.tc-file-main-text {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.01em;
}

.tc-file-sub-text {
    font-size: 15px;
    color: #64748b;
    font-weight: 500;
}

.tc-file-upload-area.has-file .tc-file-main-text {
    color: #059669;
}

.tc-file-upload-area.has-file .tc-file-sub-text {
    color: #047857;
    font-weight: 600;
}

.tc-file-info {
    font-size: 14px;
    color: #64748b;
    margin: 12px 0 0 0;
    text-align: center;
    font-style: italic;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(100, 116, 139, 0.08);
    border-radius: 8px;
    display: inline-block;
}

/* Professional upload button */
.tc-upload-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.tc-upload-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.tc-upload-btn:hover::before {
    left: 100%;
}

.tc-upload-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.4);
}

.tc-upload-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

/* Fallback: style legacy upload form (table-based) to match card */
.wrap form[action*='taxcare_upload_itr'] {
    max-width: 580px;
    margin: 48px auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 8px 16px rgba(0,0,0,0.04);
}

.wrap form[action*='taxcare_upload_itr'] .form-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 18px;
}

.wrap form[action*='taxcare_upload_itr'] .form-table th {
    width: 100%;
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    padding: 0;
}

.wrap form[action*='taxcare_upload_itr'] .form-table td {
    display: block;
    padding: 0;
}

.wrap form[action*='taxcare_upload_itr'] select,
.wrap form[action*='taxcare_upload_itr'] input[type='text'],
.wrap form[action*='taxcare_upload_itr'] input[type='file'] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    font-size: 15px;
    color: #1e293b;
}

.wrap form[action*='taxcare_upload_itr'] select:focus,
.wrap form[action*='taxcare_upload_itr'] input[type='text']:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 6px rgba(59,130,246,0.08);
}

.wrap form[action*='taxcare_upload_itr'] input[type='submit'],
.wrap form[action*='taxcare_upload_itr'] .button-primary {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    color: #fff;
    border: none;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(59,130,246,0.3);
    cursor: pointer;
}

.wrap form[action*='taxcare_upload_itr'] input[type='submit']:hover,
.wrap form[action*='taxcare_upload_itr'] .button-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
}

/* Strong fallback wrapper styles for the Upload ITR admin page */
.wrap > h1 + form[action*='taxcare_upload_itr'],
.wrap > .tc-upload-container,
.wrap form[action*='taxcare_upload_itr'] {
    max-width: 680px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Improve page heading spacing on admin */
.wrap h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

/* Description paragraph below heading */
.wrap h1 + p.description,
.wrap h1 + p {
    color: #64748b;
    margin-top: -8px;
    margin-bottom: 16px;
}

/* Center the Upload ITR tab content and constrain width */
.taxcare-dashboard #tc-tab-upload {
    display: flex;
    justify-content: center;
}
.taxcare-dashboard #tc-tab-upload > .tc-upload-container,
.taxcare-dashboard #tc-tab-upload > form,
.taxcare-dashboard #tc-tab-upload > div {
    width: 100%;
    max-width: 680px;
}

/* Ensure labels sit above controls and spacing is consistent */
.taxcare-dashboard #tc-tab-upload label {
    display: block;
    font-weight: 600;
    margin: 10px 0 6px;
}

/* Normalize controls inside tab upload */
.taxcare-dashboard #tc-tab-upload select,
.taxcare-dashboard #tc-tab-upload input[type="text"],
.taxcare-dashboard #tc-tab-upload input[type="email"],
.taxcare-dashboard #tc-tab-upload input[type="file"],
.taxcare-dashboard #tc-tab-upload .button,
.taxcare-dashboard #tc-tab-upload .tc-upload-btn {
    box-sizing: border-box;
}

/* Fallback: style legacy Add Customer form (table-based) to match card */
.wrap form[action*='taxcare_add_customer'] {
    max-width: 580px;
    margin: 32px auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 8px 16px rgba(0,0,0,0.04);
}
.wrap form[action*='taxcare_add_customer'] .form-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 18px;
}
.wrap form[action*='taxcare_add_customer'] .form-table th {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    padding: 0;
    margin: 0 0 8px 0;
}
.wrap form[action*='taxcare_add_customer'] .form-table td { display:block; padding:0; }
.wrap form[action*='taxcare_add_customer'] input[type='text'],
.wrap form[action*='taxcare_add_customer'] input[type='email'] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    font-size: 15px;
    color: #1e293b;
}
.wrap form[action*='taxcare_add_customer'] input[type='text']:focus,
.wrap form[action*='taxcare_add_customer'] input[type='email']:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 6px rgba(59,130,246,0.08);
}
.wrap form[action*='taxcare_add_customer'] .button,
.wrap form[action*='taxcare_add_customer'] input[type='submit'] {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    color: #fff;
    border: none;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(59,130,246,0.3);
    cursor: pointer;
}
.wrap form[action*='taxcare_add_customer'] .button:hover,
.wrap form[action*='taxcare_add_customer'] input[type='submit']:hover {
    transform: translateY(-2px);
}

/* Route-specific: Add Customer submenu slug styling */
body.admin_page_taxcare_add_customer .wrap {
    max-width: 680px;
    margin: 24px auto;
}
body.admin_page_taxcare_add_customer .wrap h1 {
    font-size: 32px;
    font-weight: 800;
}
body.admin_page_taxcare_add_customer .wrap h1 + * {
    margin-top: 8px;
}
body.admin_page_taxcare_add_customer .wrap .form-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
}
body.admin_page_taxcare_add_customer .wrap .form-table th {
    width: 100%;
    display: block;
    padding: 0 0 6px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}
body.admin_page_taxcare_add_customer .wrap .form-table td { display:block; padding:0; }
body.admin_page_taxcare_add_customer .wrap .form-table input[type="text"],
body.admin_page_taxcare_add_customer .wrap .form-table input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
}
body.admin_page_taxcare_add_customer .wrap .form-table input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 6px rgba(59,130,246,0.08);
}
body.admin_page_taxcare_add_customer .wrap .button-primary {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(59,130,246,0.28);
}