/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    margin: 0;
    padding: 20px;
}

/* ========================================
   MAIN CONTAINERS
   ======================================== */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 50px 45px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.08), transparent 60%);
    pointer-events: none;
}

.card-wide {
    max-width: 900px;
}

/* ========================================
   CLIPPY
   ======================================== */
.clippy-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    min-height: 130px;
    position: relative;
}

.clippy-gif {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 8px 24px rgba(99, 102, 241, 0.3));
    opacity: 0;
    transform: scale(0.8);
    animation: clippyAppear 0.6s ease forwards;
}

.clippy-gif.small {
    width: 70px;
    height: 70px;
}

.clippy-gif.typing {
    animation: clippyTyping 0.5s ease forwards, clippyFloat 2s ease-in-out infinite;
}

.clippy-gif.error {
    animation: clippyShake 0.5s ease forwards, clippyFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 8px 24px rgba(239, 68, 68, 0.5));
}

.clippy-gif.success {
    animation: clippySuccess 0.6s ease forwards, clippyFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 8px 24px rgba(52, 211, 153, 0.5));
}

.clippy-gif.pointing {
    animation: clippyPoint 0.8s ease forwards, clippyFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 8px 24px rgba(99, 102, 241, 0.5));
}

.clippy-gif.fallback {
    display: none;
}

.clippy-fallback {
    font-size: 100px;
    line-height: 120px;
    text-align: center;
    filter: drop-shadow(0 8px 24px rgba(99, 102, 241, 0.3));
    animation: clippyFloat 2s ease-in-out infinite;
    display: none;
}

.clippy-fallback.show {
    display: block;
}

.clippy-fallback.small {
    font-size: 60px;
    line-height: 70px;
}

@keyframes clippyAppear {
    0% { opacity: 0; transform: scale(0.8) rotate(-5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes clippyTyping {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.05) rotate(3deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes clippyFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes clippyShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    20% { transform: translateX(-12px) rotate(-5deg); }
    40% { transform: translateX(12px) rotate(5deg); }
    60% { transform: translateX(-8px) rotate(-3deg); }
    80% { transform: translateX(8px) rotate(3deg); }
}

@keyframes clippySuccess {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes clippyPoint {
    0% { transform: scale(1) rotate(0deg); }
    30% { transform: scale(1.1) rotate(-10deg); }
    60% { transform: scale(1.1) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* ========================================
   TITLES
   ======================================== */
.brand-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #818cf8, #a78bfa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.brand-title.admin {
    background: linear-gradient(135deg, #f472b6, #a78bfa, #818cf8);
}

.brand-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 28px;
    letter-spacing: 0.3px;
}

.brand-subtitle span {
    color: #818cf8;
    -webkit-text-fill-color: #818cf8;
}

.section-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.section-title .badge {
    background: rgba(129, 140, 248, 0.2);
    color: #a78bfa;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 12px;
    border-radius: 20px;
}

.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, rgba(255,255,255,0.1), transparent);
    margin: 25px 0;
    position: relative;
    z-index: 1;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #818cf8;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-group input.success,
.form-group textarea.success {
    border-color: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}

.form-group .hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
    padding: 15px 32px;
    background: linear-gradient(135deg, #818cf8, #6d28d9);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    margin-top: 12px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: scale(1.02);
}

.btn-success {
    background: rgba(52, 211, 153, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.2);
    color: #6ee7b7;
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.btn-success:hover {
    background: rgba(52, 211, 153, 0.25);
    transform: scale(1.02);
}

.btn-primary-small {
    background: rgba(129, 140, 248, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.2);
    color: #a78bfa;
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.btn-primary-small:hover {
    background: rgba(129, 140, 248, 0.25);
    transform: scale(1.02);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* ========================================
   RADIO GROUP
   ======================================== */
.radio-group {
    display: flex;
    gap: 16px;
    margin: 6px 0 20px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-option .radio-custom {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-option .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #818cf8;
    transition: all 0.3s ease;
}

.radio-option input:checked + .radio-custom {
    border-color: #818cf8;
}

.radio-option input:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-option input:checked ~ .radio-label {
    color: #fff;
}

.radio-option.active {
    border-color: rgba(129, 140, 248, 0.3);
    background: rgba(129, 140, 248, 0.08);
}

.radio-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* ========================================
   TABLES
   ======================================== */
.table-wrapper {
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead {
    background: rgba(255, 255, 255, 0.05);
}

.table th {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.table td {
    color: rgba(255, 255, 255, 0.85);
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* ========================================
   BADGES
   ======================================== */
.badge-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-status.admin {
    background: rgba(244, 114, 182, 0.2);
    color: #f472b6;
}

.badge-status.user {
    background: rgba(129, 140, 248, 0.15);
    color: #818cf8;
}

.badge-status.confirmed {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.badge-status.unconfirmed {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.key-name {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
    color: #c084fc;
}

/* ========================================
   MESSAGES
   ======================================== */
.message {
    display: none;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    align-items: center;
    gap: 10px;
    animation: errorSlide 0.4s ease;
    position: relative;
    z-index: 1;
}

.message.show {
    display: flex;
}

.message.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.message.success {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.25);
    color: #6ee7b7;
}

.message .msg-icon {
    font-size: 20px;
    flex-shrink: 0;
}

@keyframes errorSlide {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ========================================
   LOADING OVERLAY
   ======================================== */
.loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(15, 12, 41, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 32px;
    align-items: center;
    justify-content: center;
    z-index: 20;
    flex-direction: column;
    gap: 16px;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(129, 140, 248, 0.15);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 15px;
}

.empty-state .empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ========================================
   CLIPPY SPEECH BUBBLE
   ======================================== */
.clippy-speech {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 400;
    flex: 1;
}

.clippy-speech strong {
    color: #a78bfa;
    font-weight: 600;
}

.clippy-speech .highlight {
    color: #f472b6;
    font-weight: 600;
}

/* ========================================
   CODE INPUT
   ======================================== */
.code-input-wrapper {
    position: relative;
}

.form-group input[type="text"].code-input {
    text-align: center;
    letter-spacing: 8px;
    font-size: 18px;
    font-weight: 600;
}

/* ========================================
   DASHBOARD SPECIFIC
   ======================================== */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 40px 45px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.dashboard-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.08), transparent 60%);
    pointer-events: none;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 16px 8px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-info .avatar {
    font-size: 28px;
}

.user-info .username {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 15px;
}

.user-info .admin-badge {
    background: linear-gradient(135deg, #f472b6, #a78bfa);
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.user-info .logout-btn {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(239, 68, 68, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.user-info .logout-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.clippy-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
    min-height: 80px;
}

/* ========================================
   STATS CARDS
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-card .stat-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-top: 4px;
    font-weight: 400;
}

.stat-card .stat-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

/* ========================================
   PASSWORD STRENGTH
   ======================================== */
.password-strength {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.strength-bar .fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: all 0.4s ease;
}

.strength-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    min-width: 50px;
    text-align: right;
}

.strength-text.weak { color: #ef4444; }
.strength-text.medium { color: #f59e0b; }
.strength-text.strong { color: #34d399; }

.password-match {
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.password-match.match {
    color: #34d399;
}

.password-match.no-match {
    color: #ef4444;
}

/* ========================================
   REQUEST FORM INLINE
   ======================================== */
.request-form-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.request-form-inline .radio-group {
    display: flex;
    gap: 12px;
    margin: 0;
}

.request-form-inline .radio-group label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.request-form-inline .radio-group input[type="radio"] {
    accent-color: #818cf8;
    cursor: pointer;
}

.request-form-inline .msg-input {
    width: 100%;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
    min-width: 150px;
}

.request-form-inline .msg-input:focus {
    border-color: #818cf8;
    background: rgba(255, 255, 255, 0.08);
}

.request-form-inline .msg-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.request-form-inline .btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ========================================
   RESEND SECTION
   ======================================== */
.resend-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.resend-text {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.resend-btn {
    background: none;
    border: none;
    color: #818cf8;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.resend-btn:hover {
    color: #a78bfa;
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.timer {
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    margin-left: 6px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
    .dashboard-container {
        padding: 24px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .user-info {
        justify-content: space-between;
    }

    .brand-title {
        font-size: 22px;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .clippy-section {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .clippy-gif {
        width: 90px;
        height: 90px;
    }

    .clippy-fallback {
        font-size: 80px;
        line-height: 90px;
    }

    .clippy-gif.small {
        width: 60px;
        height: 60px;
    }

    .clippy-fallback.small {
        font-size: 50px;
        line-height: 60px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .table th,
    .table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .request-form-inline {
        align-items: stretch;
    }

    .request-form-inline .radio-group {
        flex-wrap: wrap;
    }

    .request-form-inline .btn-group {
        flex-direction: column;
    }
}

@media (max-width: 500px) {
    .card {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .dashboard-container {
        padding: 16px 14px;
        border-radius: 20px;
    }

    .brand-title {
        font-size: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 12px 14px;
    }

    .stat-card .stat-number {
        font-size: 24px;
    }

    .clippy-gif {
        width: 70px;
        height: 70px;
    }

    .clippy-fallback {
        font-size: 60px;
        line-height: 70px;
    }

    .table {
        font-size: 11px;
    }

    .table th,
    .table td {
        padding: 6px 8px;
    }

    .badge-status {
        font-size: 10px;
        padding: 1px 8px;
    }

    .key-name {
        font-size: 11px;
        padding: 2px 8px;
    }

    .btn-danger,
    .btn-success,
    .btn-primary-small {
        font-size: 11px;
        padding: 3px 10px;
    }

    .form-group input[type="text"].code-input {
        font-size: 16px;
        letter-spacing: 6px;
        padding: 12px 14px;
    }

    .password-strength {
        flex-direction: column;
        align-items: stretch;
    }

    .strength-text {
        text-align: left;
    }
}

/* ========================================
   FEEDBACK SECTION
   ======================================== */
.feedback-section {
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

/* ========================================
   TEXTAREA
   ======================================== */
.form-group textarea {
    resize: vertical;
    min-height: 80px;
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group textarea:focus {
    border-color: #818cf8;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-group textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-group textarea.success {
    border-color: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}

.clippy-gif.error,
.clippy-gif.typing,
.clippy-gif.success,
.clippy-gif.pointing {
    position: relative !important;
    z-index: 9999 !important;
    opacity: 1 !important;
}

.clippy-wrapper {
    position: relative !important;
    z-index: 100 !important;
}

.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    animation: popupFadeIn 0.3s ease;
}

.popup-overlay.show {
    display: flex;
}

@keyframes popupFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.popup {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 40px 45px;
    max-width: 420px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    text-align: center;
    animation: popupScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popupScale {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.popup .popup-icon {
    font-size: 56px;
    margin-bottom: 12px;
    display: block;
}

.popup .popup-title {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.popup .popup-message {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.popup .popup-btn {
    background: linear-gradient(135deg, #818cf8, #6d28d9);
    border: none;
    border-radius: 12px;
    padding: 10px 32px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup .popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.popup.error .popup-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.popup.error .popup-btn:hover {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

.popup.success .popup-btn {
    background: linear-gradient(135deg, #34d399, #059669);
}

.popup.success .popup-btn:hover {
    box-shadow: 0 8px 24px rgba(52, 211, 153, 0.35);
}