/* ==========================================
   TEAM DASHBOARD STYLES
   ========================================== */

/* Container */
.team-dashboard {
    min-height: 100vh;
    background: #f1f5f9;
    font-family: system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   HEADER
   ========================================== */
.team-header {
    background: white;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.team-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-header-title {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.team-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    padding: 6px 16px 6px 10px;
    border-radius: 30px;
}

.team-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.team-user-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.team-logout-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
}

.team-logout-btn:hover {
    background: #fecaca;
}

/* ==========================================
   MAIN LAYOUT
   ========================================== */
.team-main {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 70px);
}

/* ==========================================
   SIDEBAR
   ========================================== */
.team-sidebar {
    width: 320px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 70px);
    position: sticky;
    top: 70px;
    overflow: hidden;
}

.team-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: white;
    flex-shrink: 0;
}

.team-sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 4px 0;
}

.team-sidebar-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* Team Info in Sidebar */
.team-info-card {
    padding: 16px 20px;
    margin: 12px;
    background: #eef2ff;
    border-radius: 12px;
    border: 1px solid #c7d2fe;
    flex-shrink: 0;
}

.team-info-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-info-dept {
    font-size: 13px;
    color: #475569;
    margin: 4px 0 0 0;
}

/* Sub-team List */
.team-subteam-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px 12px 12px;
}

.team-subteam-item {
    padding: 12px 16px;
    margin-bottom: 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-subteam-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.team-subteam-item.active {
    background: #eef2ff;
    border-color: #6366f1;
}

.team-subteam-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.team-subteam-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.team-subteam-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.team-subteam-email {
    font-size: 12px;
    color: #94a3b8;
    display: block;
}

.team-subteam-count {
    font-size: 12px;
    background: #e2e8f0;
    padding: 2px 10px;
    border-radius: 12px;
    color: #475569;
    flex-shrink: 0;
}

/* Empty State */
.team-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.team-empty-state .material-icons {
    font-size: 48px;
    color: #cbd5e1;
}

/* ==========================================
   DETAIL VIEW
   ========================================== */
.team-detail-view {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
    background: #f1f5f9;
}

/* Sub-team Detail Header */
.team-detail-header {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.team-detail-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.team-detail-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 20px;
    flex-shrink: 0;
}

.team-detail-info h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.team-detail-info p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.team-detail-actions {
    display: flex;
    gap: 8px;
}

.team-add-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.team-add-btn:hover {
    background: #4f46e5;
}

.team-add-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================
   DELEGATE GRID
   ========================================== */
.team-delegate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.team-delegate-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.team-delegate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* Delegate Card */
.team-delegate-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    animation: fadeIn 0.3s ease;
}

.team-delegate-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.team-delegate-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.team-delegate-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.team-delegate-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-delegate-photo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
}

.team-delegate-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.team-delegate-department {
    font-size: 13px;
    color: #64748b;
    margin: 2px 0 0 0;
}

.team-delegate-body {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.team-delegate-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.team-delegate-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
}

.team-delegate-info-item .material-icons {
    font-size: 16px;
    color: #94a3b8;
}

.team-delegate-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.team-delegate-actions button {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background 0.2s;
}

.team-edit-btn {
    background: #e0e7ff;
    color: #4f46e5;
}

.team-edit-btn:hover {
    background: #c7d2fe;
}

.team-delete-btn {
    background: #fee2e2;
    color: #dc2626;
}

.team-delete-btn:hover {
    background: #fecaca;
}

/* Empty Delegates */
.team-empty-delegates {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.team-empty-delegates .material-icons {
    font-size: 64px;
    color: #cbd5e1;
}

.team-empty-delegates h3 {
    color: #64748b;
    margin: 16px 0 8px 0;
}

.team-empty-delegates p {
    color: #94a3b8;
}

/* ==========================================
   DRAWER / MODAL
   ========================================== */
.team-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.team-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 480px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

.team-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.team-drawer-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-drawer-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-drawer-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.team-drawer-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
    background: #f8fafc;
}

/* ==========================================
   FORM STYLES
   ========================================== */
.team-form-group {
    margin-bottom: 20px;
}

.team-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.team-form-required {
    color: #ef4444;
    margin-left: 4px;
}

.team-form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
    background: white;
}

.team-form-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.team-form-input:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
}

.team-form-file {
    padding: 10px;
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
    width: 100%;
}

.team-form-file:hover {
    border-color: #6366f1;
}

.team-photo-preview {
    margin-bottom: 8px;
}

.team-photo-preview img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

/* ==========================================
   BUTTONS
   ========================================== */
.team-primary-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.team-primary-btn:hover {
    background: #4f46e5;
}

.team-primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.team-secondary-btn {
    background: #f1f5f9;
    color: #1e293b;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.team-secondary-btn:hover {
    background: #e2e8f0;
}

.team-secondary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================
   LOADING
   ========================================== */
.team-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .team-sidebar {
        width: 280px;
    }

    .team-detail-view {
        padding: 20px;
    }

    .team-drawer {
        width: 100%;
    }

    .team-delegate-grid {
        grid-template-columns: 1fr;
    }

    .team-detail-header {
        flex-direction: column;
        gap: 16px;
    }

    .team-detail-header-left {
        width: 100%;
    }

    .team-detail-actions {
        width: 100%;
    }

    .team-detail-actions button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .team-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        max-height: 300px;
    }

    .team-main {
        flex-direction: column;
    }

    .team-header {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }

    .team-user-info {
        padding: 4px 12px 4px 8px;
    }
}

/* Add these to your existing style.css */

/* Small Action Buttons in Sidebar */
.team-action-btn {
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.2s;
    height: 28px;
}

.team-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.team-add-btn-small {
    background: #6366f1;
    color: white;
}

.team-add-btn-small:hover:not(:disabled) {
    background: #4f46e5;
}

.team-edit-btn-small {
    background: #e0e7ff;
    color: #4f46e5;
}

.team-edit-btn-small:hover:not(:disabled) {
    background: #c7d2fe;
}

.team-delete-btn-small {
    background: #fee2e2;
    color: #dc2626;
}

.team-delete-btn-small:hover:not(:disabled) {
    background: #fecaca;
}

/* Add Delegate Button in Detail View */
.team-add-delegate-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
    height: 36px;
    white-space: nowrap;
}

.team-add-delegate-btn:hover:not(:disabled) {
    background: #4f46e5;
}

.team-add-delegate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Drawer buttons - make them smaller */
.team-primary-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
    height: 36px;
}

.team-primary-btn:hover:not(:disabled) {
    background: #4f46e5;
}

.team-primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.team-secondary-btn {
    background: #f1f5f9;
    color: #1e293b;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    height: 36px;
}

.team-secondary-btn:hover:not(:disabled) {
    background: #e2e8f0;
}

.team-secondary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Delegate card actions - make buttons smaller */
.team-delegate-actions button {
    flex: 1;
    padding: 4px 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: background 0.2s;
    height: 28px;
}

.team-edit-btn {
    background: #e0e7ff;
    color: #4f46e5;
}

.team-edit-btn:hover:not(:disabled) {
    background: #c7d2fe;
}

.team-delete-btn {
    background: #fee2e2;
    color: #dc2626;
}

.team-delete-btn:hover:not(:disabled) {
    background: #fecaca;
}

/* Logout button */
.team-logout-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
    height: 34px;
}

.team-logout-btn:hover:not(:disabled) {
    background: #fecaca;
}

.team-logout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Header buttons */
.team-add-subteam-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
    height: 34px;
}

.team-add-subteam-btn:hover:not(:disabled) {
    background: #4f46e5;
}

.team-add-subteam-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Detail view action buttons */
.team-detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.team-edit-subteam-btn {
    background: #e0e7ff;
    color: #4f46e5;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
    height: 36px;
}

.team-edit-subteam-btn:hover:not(:disabled) {
    background: #c7d2fe;
}

.team-edit-subteam-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.team-delete-subteam-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
    height: 36px;
}

.team-delete-subteam-btn:hover:not(:disabled) {
    background: #fecaca;
}

.team-delete-subteam-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.team-add-delegate-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
    height: 36px;
}

.team-add-delegate-btn:hover:not(:disabled) {
    background: #059669;
}

.team-add-delegate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Remove old sidebar buttons */
.team-info-card .team-action-btn {
    display: none;
}

/* ==========================================
   DELEGATE REGISTRATION - COMPLETE CSS
   ========================================== */

/* Container */
.delegate-reg-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    font-family: system-ui, -apple-system, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.delegate-reg-wrapper {
    width: 100%;
    max-width: 1100px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: delegateSlideUp 0.5s ease;
}

@keyframes delegateSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   HEADER
   ========================================== */
.delegate-reg-header {
    padding: 24px 32px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.delegate-reg-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.delegate-reg-header-left h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* Step Indicator */
.delegate-reg-step-indicator {
    display: flex;
    align-items: center;
    gap: 0;
}

.delegate-reg-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.delegate-reg-step.active {
    color: #6366f1;
}

.delegate-reg-step.completed {
    color: #10b981;
}

.delegate-reg-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.delegate-reg-step.active .delegate-reg-step-number {
    background: #6366f1;
    color: white;
}

.delegate-reg-step.completed .delegate-reg-step-number {
    background: #10b981;
    color: white;
}

.delegate-reg-step-label {
    display: none;
}

@media (min-width: 768px) {
    .delegate-reg-step-label {
        display: inline;
    }
}

.delegate-reg-step-line {
    width: 30px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 4px;
}

/* ==========================================
   ERROR & SUCCESS MESSAGES
   ========================================== */
.delegate-reg-error,
.delegate-reg-success {
    margin: 16px 32px 0 32px;
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: delegateFadeIn 0.3s ease;
}

.delegate-reg-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.delegate-reg-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

@keyframes delegateFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   BODY
   ========================================== */
.delegate-reg-body {
    padding: 32px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.delegate-reg-body::-webkit-scrollbar {
    width: 6px;
}

.delegate-reg-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.delegate-reg-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* ==========================================
   FORM
   ========================================== */
.delegate-reg-form {
    width: 100%;
}

.delegate-reg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .delegate-reg-grid {
        grid-template-columns: 1fr;
    }
}

.delegate-reg-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.delegate-reg-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.delegate-reg-label {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.delegate-reg-required {
    color: #ef4444;
}

.delegate-reg-input,
.delegate-reg-textarea,
.delegate-reg-select {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: white;
    color: #1e293b;
    width: 100%;
}

.delegate-reg-input:focus,
.delegate-reg-textarea:focus,
.delegate-reg-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.delegate-reg-input:disabled,
.delegate-reg-textarea:disabled,
.delegate-reg-select:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
}

.delegate-reg-textarea {
    resize: vertical;
    min-height: 60px;
}

.delegate-reg-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 2px 0 0 0;
}

.delegate-reg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .delegate-reg-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   PHOTO UPLOAD
   ========================================== */
.delegate-reg-photo-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.delegate-reg-photo-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e2e8f0;
    flex-shrink: 0;
}

.delegate-reg-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.delegate-reg-photo-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}

.delegate-reg-photo-remove:hover {
    background: #dc2626;
}

.delegate-reg-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 28px;
    border: 3px solid #e2e8f0;
    flex-shrink: 0;
}

.delegate-reg-file-input {
    display: none;
}

.delegate-reg-upload-btn {
    padding: 8px 16px;
    background: #f1f5f9;
    border: 1px dashed #94a3b8;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.delegate-reg-upload-btn:hover {
    background: #e2e8f0;
    border-color: #6366f1;
}

/* ==========================================
   FORM ACTIONS
   ========================================== */
.delegate-reg-actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

.delegate-reg-submit-btn {
    padding: 12px 32px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.delegate-reg-submit-btn:hover:not(:disabled) {
    background: #4f46e5;
}

.delegate-reg-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================
   OTP STEP
   ========================================== */
.delegate-reg-otp-container {
    max-width: 450px;
    margin: 0 auto;
    text-align: center;
}

.delegate-reg-otp-header {
    margin-bottom: 32px;
}

.delegate-reg-otp-header h2 {
    font-size: 24px;
    color: #1e293b;
    margin: 12px 0 8px 0;
}

.delegate-reg-otp-header p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

.delegate-reg-otp-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.delegate-reg-otp-input {
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 8px;
    font-family: monospace;
    transition: all 0.2s;
    width: 100%;
}

.delegate-reg-otp-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.delegate-reg-otp-input:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
}

.delegate-reg-otp-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.delegate-reg-back-btn {
    padding: 10px 20px;
    background: #f1f5f9;
    color: #1e293b;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.delegate-reg-back-btn:hover:not(:disabled) {
    background: #e2e8f0;
}

.delegate-reg-verify-btn {
    padding: 10px 24px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.delegate-reg-verify-btn:hover:not(:disabled) {
    background: #059669;
}

.delegate-reg-verify-btn:disabled,
.delegate-reg-back-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.delegate-reg-otp-footer {
    margin-top: 8px;
}

.delegate-reg-otp-timer {
    font-size: 14px;
    color: #64748b;
}

.delegate-reg-resend-btn {
    background: none;
    border: none;
    color: #6366f1;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.delegate-reg-resend-btn:hover:not(:disabled) {
    color: #4f46e5;
    text-decoration: underline;
}

.delegate-reg-resend-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================
   SPINNER
   ========================================== */
.delegate-reg-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: delegateSpin 0.8s linear infinite;
}

@keyframes delegateSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   FOOTER
   ========================================== */
.delegate-reg-footer {
    padding: 16px 32px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.delegate-reg-footer p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.delegate-reg-footer a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.delegate-reg-footer a:hover {
    text-decoration: underline;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .delegate-reg-container {
        padding: 20px 12px;
    }

    .delegate-reg-header {
        padding: 16px 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .delegate-reg-header-left h1 {
        font-size: 18px;
    }

    .delegate-reg-body {
        padding: 20px;
    }

    .delegate-reg-step-indicator {
        justify-content: center;
    }

    .delegate-reg-step {
        padding: 4px 8px;
        font-size: 12px;
    }

    .delegate-reg-step-line {
        width: 20px;
    }

    .delegate-reg-error,
    .delegate-reg-success {
        margin: 12px 20px 0 20px;
        padding: 10px 14px;
        font-size: 13px;
    }

    .delegate-reg-otp-container {
        max-width: 100%;
    }

    .delegate-reg-otp-actions {
        flex-direction: column;
    }

    .delegate-reg-otp-actions button {
        justify-content: center;
    }

    .delegate-reg-footer {
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .delegate-reg-photo-wrapper {
        justify-content: center;
    }

    .delegate-reg-actions {
        justify-content: center;
    }

    .delegate-reg-submit-btn {
        width: 100%;
        justify-content: center;
    }
}