/* Identity Pages Modern UI - Matching Designer Style */

:root {
    --brand-primary: #9E7FA4;
    --brand-secondary: #D4A5D8;
    --text-dark: #2D3748;
    --text-muted: #718096;
    --border-color: #E2E8F0;
    --bg-light: #F7FAFC;
    --shadow-sm: 0 2px 8px rgba(158, 127, 164, 0.1);
    --shadow-md: 0 4px 16px rgba(158, 127, 164, 0.15);
    --shadow-lg: 0 8px 24px rgba(158, 127, 164, 0.2);
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* Page Container */
.identity-page-container {
    min-height: 70vh;
    padding: 2rem 0;
    margin-top: 6rem;
}

/* Modern Card Container */
.identity-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.identity-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.identity-card-body {
    padding: 2.5rem;
}

/* Page Header */
.identity-page-header {
    margin-bottom: 2rem;
    text-align: center;
}

.identity-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.identity-page-title i {
    color: var(--brand-primary);
    font-size: 2rem;
}

.identity-page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

/* Form Elements */
.identity-form {
    width: 100%;
}

.identity-form .form-floating {
    margin-bottom: 1.5rem;
}

.identity-form .form-control,
.identity-form .form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.identity-form .form-control:focus,
.identity-form .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem rgba(158, 127, 164, 0.15);
    outline: none;
}

.identity-form .form-label {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.identity-form .form-floating > label {
    color: var(--text-muted);
    padding: 1rem 1rem;
}

/* Checkbox Styling */
.identity-form .form-check {
    padding-left: 2rem;
    margin: 1.5rem 0;
}

.identity-form .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-color);
    cursor: pointer;
}

.identity-form .form-check-input:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.identity-form .form-check-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem rgba(158, 127, 164, 0.25);
}

.identity-form .form-check-label {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-left: 0.5rem;
    cursor: pointer;
}

.identity-form .form-check-label a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
}

.identity-form .form-check-label a:hover {
    text-decoration: underline;
}

/* Buttons */
#registerBtnWrapper {
    cursor: pointer;
}

.identity-btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1.125rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    width: 100%;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    pointer-events: all;
}

.identity-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #8A6B8F 0%, #C090C3 100%);
}

.identity-btn-primary:active {
    transform: translateY(0);
}

.identity-btn-primary:disabled {
    background: #cbd5e0;
    color: #a0aec0;
    cursor: pointer;
    transform: none;
    opacity: 0.6;
    pointer-events: none;
}

.identity-btn-primary.btn-enabled-animation {
    animation: btnEnable 0.3s ease;
}

@keyframes btnEnable {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.identity-btn-secondary {
    background: white;
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 0.75rem;
}

.identity-btn-secondary:hover {
    background: var(--brand-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Links Section */
.identity-links {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.identity-links p {
    margin-bottom: 0.75rem;
}

.identity-links a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.identity-links a:hover {
    color: var(--brand-secondary);
    text-decoration: underline;
}

/* Divider */
.identity-divider {
    margin: 2rem 0;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.identity-divider-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* External Login Buttons */
.identity-external-login {
    margin-top: 1.5rem;
}

.identity-external-login button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Validation Messages */
.text-danger {
    color: #E53E3E;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Alert Messages */
.identity-alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid;
}

.identity-alert-danger {
    background: #FFF5F5;
    border-color: #FEB2B2;
    color: #C53030;
}

.identity-alert-success {
    background: #F0FFF4;
    border-color: #9AE6B4;
    color: #276749;
}

.identity-alert-info {
    background: #EBF8FF;
    border-color: #90CDF4;
    color: #2C5282;
}

/* Status Message */
.identity-status-message {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

/* Form Group Spacing */
.identity-form .form-group {
    margin-bottom: 1.5rem;
}

.identity-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .identity-page-container {
        margin-top: 5rem;
        padding: 1rem 0;
    }

    .identity-card-body {
        padding: 1.5rem;
    }

    .identity-page-title {
        font-size: 1.5rem;
    }

    .identity-page-title i {
        font-size: 1.5rem;
    }
}

/* Admin Pages Specific */
.identity-table {
    margin-top: 2rem;
}

.identity-table-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    overflow-x: auto;
}

.identity-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.identity-table th {
    background: var(--bg-light);
    color: var(--text-dark);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

.identity-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

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

.identity-table tr:hover {
    background: var(--bg-light);
}

/* Badge Styles */
.identity-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.identity-badge-primary {
    background: rgba(158, 127, 164, 0.15);
    color: var(--brand-primary);
}

.identity-badge-success {
    background: rgba(72, 187, 120, 0.15);
    color: #38A169;
}

.identity-badge-warning {
    background: rgba(237, 137, 54, 0.15);
    color: #DD6B20;
}

.identity-badge-danger {
    background: rgba(245, 101, 101, 0.15);
    color: #E53E3E;
}

/* Animations for Terms Checkbox */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

.pulse-animation {
    animation: pulse 0.5s ease-in-out;
}
