/* ===== EMPLOYEE REGISTRATION - Premium Dark Theme ===== */

/* --- Root Variables --- */
:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #0c1322;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --border-color: #334155;
    --error: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;
}

/* --- Global Reset --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    min-height: 100vh;
}

/* --- Container --- */
.registration-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* --- Title Area --- */
.form-title {
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    font-size: 1.6rem;
}

.form-subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 400;
}

/* --- Tab Wrapper (Sidebar + Content) --- */
.tab-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- Sidebar Tabs --- */
.tab-sidebar {
    width: 100%;
    background: #111827;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.tab-sidebar::-webkit-scrollbar {
    height: 6px;
}
.tab-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.tab-btn {
    flex: 1;
    min-width: max-content;
    padding: 16px 20px;
    text-align: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Step Number Circle */
.step-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tab-btn.active .step-icon {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

/* Completed State */
.tab-btn.completed .step-icon {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.tab-btn.completed .step-text {
    color: var(--text-muted);
}

.check-mark {
    display: none;
    margin-left: auto;
    color: var(--success);
    font-weight: bold;
    font-size: 1rem;
}

.tab-btn.completed .check-mark {
    display: inline-block;
}

/* --- Content Section --- */
.tab-content {
    flex: 1;
    padding: 36px 40px;
    background: var(--bg-card);
}

.section-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    margin-bottom: 28px;
    padding-bottom: 14px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.3px;
}

/* --- Grid System --- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

[class*="col-md-"] {
    padding: 0 12px 18px 12px;
    box-sizing: border-box;
}

.col-md-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* --- Form Elements --- */
label {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required-star {
    color: #f87171;
    font-weight: 700;
}

.form-control {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.88rem;
    color: var(--text-main);
    transition: all 0.25s ease;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    outline: none;
    background-color: #111827;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.18);
    font-size: 0.84rem;
    font-style: italic;
}

.form-control:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

/* Textarea (Address) */
textarea.form-control {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* Readonly */
.form-control[readonly] {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    opacity: 0.75;
}

/* Select Dropdown */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
}

select.form-control option {
    background: #1e293b;
    color: var(--text-main);
}

/* Password toggle container */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--text-main);
}

/* Password strength bar */
.password-strength {
    height: 3px;
    border-radius: 3px;
    margin-top: 6px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

.password-strength-text {
    font-size: 0.72rem;
    margin-top: 3px;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- Buttons --- */
.btn-container {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    align-items: center;
}

.btn-register {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    border: none;
    padding: 12px 32px;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-register:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -4px rgba(139, 92, 246, 0.4);
}

.btn-prev {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 12px 28px;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.btn-prev:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

/* --- Toast Notifications --- */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast-msg {
    min-width: 320px;
    max-width: 420px;
    padding: 14px 20px;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInRight 0.3s ease;
}

.toast-success {
    background: rgba(16, 185, 129, 0.92);
}

.toast-error {
    background: rgba(239, 68, 68, 0.92);
}

.toast-info {
    background: rgba(59, 130, 246, 0.92);
}

.toast-warning {
    background: rgba(245, 158, 11, 0.92);
}

/* --- Result Modal (Success/Error Popup) --- */
.result-modal-overlay {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 0.2s ease;
}

.result-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-modal {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    padding: 40px;
    border-radius: 20px;
    width: 440px;
    max-width: 90vw;
    text-align: center;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.35s ease;
}

.result-modal-icon {
    font-size: 56px;
    margin-bottom: 16px;
    line-height: 1;
}

.result-modal h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.result-modal p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
}

.result-modal .modal-btn {
    display: inline-block;
    padding: 12px 36px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.result-modal .btn-success-action {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
}

.result-modal .btn-success-action:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.result-modal .btn-error-action {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-modal .btn-error-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

/* Modal type borders */
.result-modal.modal-type-success {
    border-top: 3px solid var(--success);
}

.result-modal.modal-type-success h3 {
    color: #6ee7b7;
}

.result-modal.modal-type-error {
    border-top: 3px solid var(--error);
}

.result-modal.modal-type-error h3 {
    color: #fca5a5;
}

.result-modal.modal-type-warning {
    border-top: 3px solid var(--warning);
}

.result-modal.modal-type-warning h3 {
    color: #fcd34d;
}

/* --- Login Link Footer --- */
.login-link-container {
    text-align: center;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.login-link-container p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.login-link-container a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.login-link-container a:hover {
    color: #a78bfa;
    text-decoration: underline;
}

/* --- Alert Boxes --- */
.alert-danger {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* --- Loading State --- */
.form-loading {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
}

/* Input error highlight */
.input-error {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15) !important;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(24px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- Mobile Responsive --- */
@media (max-width: 992px) {
    .registration-container {
        padding: 20px 10px 30px;
    }

    .tab-wrapper {
        border-radius: 12px;
    }

    .tab-sidebar {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tab-sidebar::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 12px 16px;
        font-size: 0.8rem;
        gap: 8px;
    }

    .tab-btn.active {
        border-bottom-color: var(--accent);
    }

    .step-icon {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .check-mark {
        font-size: 0.9rem;
        margin-left: 4px;
    }

    .tab-content {
        padding: 20px 16px;
    }

    .col-md-4,
    .col-md-6,
    .col-md-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .btn-container {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .btn-register,
    .btn-prev {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .result-modal {
        padding: 28px;
        width: 90vw;
    }
}

/* --- Uploader Components (Aesthetic) --- */
.container-upload {
    width: 100%;
    margin-bottom: 20px;
}
.drop-area {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    background-color: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.drop-area:hover, .drop-area.has-file {
    border-color: var(--accent);
    background-color: rgba(139, 92, 246, 0.05);
}
.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}
.file-section {
    position: relative;
    z-index: 1;
}
.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.file-title {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
}
.file-subtitle {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.drop-area.has-file .file-subtitle {
    color: var(--success);
    font-weight: 600;
}
.add-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    pointer-events: none;
    transition: all 0.3s ease;
}
.drop-area:hover .add-button {
    background: var(--accent);
    color: #fff;
}
.drop-area.has-file .add-button {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}
.drop-area.has-file .add-button svg {
    display: none;
}
.drop-area.has-file .add-button::before {
    content: "✓";
    font-size: 14px;
}

/* Remove File Icon inside Dropzone */
.remove-file-button {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    opacity: 0.8;
    transition: all 0.2s;
    padding: 0;
}
.remove-file-button:hover {
    opacity: 1;
    transform: scale(1.1);
    background: #dc2626;
}

/* Remove button enhancements for rows */
.btn-remove-row {
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444; 
    background: rgba(239, 68, 68, 0.05); 
    border-radius: 8px; 
    padding: 8px 16px; 
    font-weight: 600; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    transition: all 0.2s;
}
.btn-remove-row:hover {
    background: var(--error);
    color: #fff;
}

/* Mini Drop Area for Table Cells */
.drop-area-mini {
    position: relative;
    border: 1px dashed rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 10px;
    transition: all 0.2s;
    cursor: pointer;
    min-width: 170px;
}
.drop-area-mini:hover {
    background: rgba(139, 92, 246, 0.05);
    border-color: var(--accent-light);
}
.drop-area-mini.has-file {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--success);
}
.drop-area-mini .file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}
.drop-area-mini .file-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.drop-area-mini .add-button {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 600;
}
.drop-area-mini .remove-file-button {
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
}

@media (max-width: 500px) {
    .file-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .add-button {
        width: 100%;
        justify-content: center;
    }
    .file-subtitle {
        max-width: 100%;
    }
}

/* --- Full Screen Loader --- */
.loader-svg-container {
  --uib-size: 100px;
  --uib-color: var(--accent);
  --uib-speed: 1.4s;
  --uib-bg-opacity: 0.1;
  height: var(--uib-size);
  width: var(--uib-size);
  transform-origin: center;
  overflow: visible;
}

.loader-svg-container .car {
  fill: none;
  stroke: var(--uib-color);
  stroke-dasharray: 15, 85;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  animation: travel var(--uib-speed) linear infinite;
  will-change: stroke-dasharray, stroke-dashoffset;
  transition: stroke 0.5s ease;
}

.loader-svg-container .track {
  stroke: var(--uib-color);
  opacity: var(--uib-bg-opacity);
  transition: stroke 0.5s ease;
}

@keyframes travel {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -100;
  }
}