/* Reset and base */
.cerberus-gate {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Container */
.cerberus-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

/* Main box */
.cerberus-box {
    background: #ffffff;
    border-radius: 8px;
    padding: 26px 24px 34px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #c3c4c7;
    text-align: center;
}

/* Logo */
.cerberus-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    background: #2271b1;
    border-radius: 50%;
    margin-bottom: 20px;
    color: #ffffff;
}

.cerberus-logo-error {
    background: #d63638;
}

/* Typography */
.cerberus-box h1 {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 400;
    color: #1d2327;
}

.cerberus-box p {
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #50575e;
}

/* Form fields */
.cerberus-field {
    margin-bottom: 16px;
    text-align: left;
}

.cerberus-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.cerberus-field input {
    width: 100%;
    padding: 3px 5px;
    font-size: 24px;
    line-height: 1.3;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #ffffff;
    transition: all 0.1s ease;
    box-sizing: border-box;
}

.cerberus-field input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Code input */
.cerberus-code-input {
    text-align: center;
    font-size: 24px !important;
    font-weight: 600;
    letter-spacing: 8px;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
}

/* Button */
.cerberus-button {
    display: inline-block;
    width: 100%;
    padding: 0 12px;
    height: 36px;
    line-height: 36px;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    background: #2271b1;
    border: 1px solid #2271b1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.1s ease;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
}

.cerberus-button:hover {
    background: #135e96;
    border-color: #135e96;
}

.cerberus-button:active {
    background: #135e96;
    border-color: #135e96;
}

.cerberus-button:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.cerberus-button-secondary {
    background: #f6f7f7;
    border-color: #c3c4c7;
    color: #50575e;
}

.cerberus-button-secondary:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
    color: #1d2327;
}

/* Messages */
.cerberus-error {
    padding: 12px;
    margin-bottom: 16px;
    background: #fcf0f1;
    border: 1px solid #d63638;
    border-left-width: 4px;
    border-radius: 4px;
    color: #d63638;
    font-size: 14px;
}

.cerberus-success {
    padding: 12px;
    margin-bottom: 16px;
    background: #edfaef;
    border: 1px solid #00a32a;
    border-left-width: 4px;
    border-radius: 4px;
    color: #00a32a;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cerberus-warning {
    padding: 12px;
    margin-bottom: 16px;
    background: #fcf9e8;
    border: 1px solid #dba617;
    border-left-width: 4px;
    border-radius: 4px;
    color: #996800;
    font-size: 14px;
}

.cerberus-hint {
    margin-top: 16px !important;
    margin-bottom: 0 !important;
    font-size: 13px !important;
    color: #9ca3af !important;
}

.cerberus-reason {
    color: #4b5563 !important;
    font-weight: 500;
}

/* Turnstile widget */
.cf-turnstile {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

/* Footer */
.cerberus-footer {
    margin-top: 24px;
    text-align: center;
}

.cerberus-footer p {
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: #787c82;
    line-height: 1.8;
}

.cerberus-footer strong {
    color: #50575e;
}

.cerberus-footer .cerberus-brand {
    font-size: 11px;
    color: #a7aaad;
}

.cerberus-footer .cerberus-brand a {
    color: #2271b1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cerberus-footer .cerberus-brand a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* ============================================
   Admin Styles - Clean & Compact
   ============================================ */

.cerberus-admin {
    max-width: 720px;
    margin: 20px 20px 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.cerberus-admin .cerberus-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.cerberus-admin .cerberus-header h1 {
    margin: 0;
    font-size: 21px;
    font-weight: 600;
    color: #1d2327;
}

.cerberus-admin .cerberus-version {
    font-size: 11px;
    color: #8c8f94;
    background: #f0f0f1;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Grid */
.cerberus-admin .cerberus-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Cards */
.cerberus-admin .cerberus-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.cerberus-admin .cerberus-card-header {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    background: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
}

.cerberus-admin .cerberus-card-body {
    padding: 16px;
}

/* Status Grid */
.cerberus-admin .cerberus-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cerberus-admin .cerberus-status-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cerberus-admin .cerberus-status-label {
    font-size: 11px;
    color: #8c8f94;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Badges */
.cerberus-admin .cerberus-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: #50575e;
}

.cerberus-admin .cerberus-badge-success {
    color: #00a32a;
}

.cerberus-admin .cerberus-badge-error {
    color: #d63638;
}

/* Add Form */
.cerberus-admin .cerberus-add-form {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.cerberus-admin .cerberus-input {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.1s, box-shadow 0.1s;
}

.cerberus-admin .cerberus-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.cerberus-admin .cerberus-input::placeholder {
    color: #a7aaad;
}

/* Buttons */
.cerberus-admin .cerberus-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #f6f7f7;
    color: #50575e;
    cursor: pointer;
    transition: all 0.1s;
}

.cerberus-admin .cerberus-btn:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
    color: #1d2327;
}

.cerberus-admin .cerberus-btn-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.cerberus-admin .cerberus-btn-primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

.cerberus-admin .cerberus-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #a7aaad;
    cursor: pointer;
    transition: all 0.1s;
}

.cerberus-admin .cerberus-btn-icon:hover {
    background: #fcf0f1;
    color: #d63638;
}

/* List */
.cerberus-admin .cerberus-list {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 12px;
}

.cerberus-admin .cerberus-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f1;
}

.cerberus-admin .cerberus-list-item:last-child {
    border-bottom: none;
}

.cerberus-admin .cerberus-list-item code {
    font-size: 12px;
    color: #1d2327;
    background: none;
    padding: 0;
}

.cerberus-admin .cerberus-list-item form {
    margin: 0;
    line-height: 1;
}

/* Empty State */
.cerberus-admin .cerberus-empty {
    padding: 20px;
    text-align: center;
    color: #8c8f94;
    font-size: 13px;
    border: 1px dashed #e0e0e0;
    border-radius: 4px;
    margin-bottom: 12px;
}

/* Locked Notice */
.cerberus-admin .cerberus-notice {
    padding: 10px 14px;
    margin-bottom: 12px;
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    border-radius: 4px;
    color: #2271b1;
    font-size: 13px;
}

.cerberus-admin .cerberus-notice code {
    background: #e1ecf4;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
}

/* Hint */
.cerberus-admin .cerberus-hint {
    font-size: 12px;
    color: #8c8f94;
}

.cerberus-admin .cerberus-hint code {
    font-size: 11px;
    background: #f0f0f1;
    padding: 2px 5px;
    border-radius: 3px;
    color: #50575e;
}

/* Text */
.cerberus-admin .cerberus-text-muted {
    margin: 0 0 12px;
    font-size: 13px;
    color: #646970;
}

.cerberus-admin .cerberus-text-muted code {
    background: #f0f0f1;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
}

/* Code Block */
.cerberus-admin .cerberus-code {
    margin: 0;
    padding: 14px 16px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
}

.cerberus-admin .cerberus-code code {
    background: none;
    padding: 0;
    font-size: inherit;
}

.cerberus-admin .c-comment { color: #8c8f94; }
.cerberus-admin .c-fn { color: #6f42c1; }
.cerberus-admin .c-str { color: #22863a; }
.cerberus-admin .c-num { color: #d63638; }

/* Footer */
.cerberus-admin .cerberus-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    color: #8c8f94;
    display: flex;
    gap: 8px;
}

.cerberus-admin .cerberus-footer a {
    color: #646970;
    text-decoration: none;
}

.cerberus-admin .cerberus-footer a:hover {
    color: #2271b1;
}

/* Settings Errors Override */
.cerberus-admin .notice {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: 4px;
    border-left-width: 4px;
}

.cerberus-admin .notice-success {
    background: #edfaef;
    border-color: #00a32a;
}

.cerberus-admin .notice-error {
    background: #fcf0f1;
    border-color: #d63638;
}

.cerberus-admin .notice p {
    margin: 0;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 600px) {
    .cerberus-admin .cerberus-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .cerberus-container {
        padding: 16px;
    }

    .cerberus-box {
        padding: 20px 16px 26px;
    }

    .cerberus-logo {
        width: 64px;
        height: 64px;
    }

    .cerberus-logo svg {
        width: 32px;
        height: 32px;
    }

    .cerberus-box h1 {
        font-size: 20px;
    }

    .cerberus-field input {
        font-size: 20px;
    }

    .cerberus-code-input {
        font-size: 20px !important;
        letter-spacing: 4px;
    }
}
