* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
}

/* ── Login page (QNB-style layout, DEMO BANK branding) ── */

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #e8e4df;
}

.site-header {
    display: flex;
    align-items: stretch;
    height: 72px;
    background: linear-gradient(90deg, #3d0044 0%, #6a0048 40%, #8a0045 100%);
    overflow: hidden;
}

.headerLeftDiv {
    position: relative;
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 40px 0 30px;
    min-width: 260px;
    clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
}

.header-logo {
    height: 38px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 40px;
}

.header-right span {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.login-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 50px 20px 40px;
    background: linear-gradient(180deg, #ddd8d2 0%, #e8e4df 100%);
}

.login-wrapper {
    width: 100%;
    max-width: 680px;
}

.login-box {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 2px;
    padding: 36px 50px 40px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.login-form .form-group {
    margin-bottom: 22px;
}

.login-form label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
}

.login-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #aaa;
    border-radius: 0;
    font-size: 16px;
    outline: none;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.login-form input:focus {
    border-color: #8a0045;
    box-shadow: 0 0 0 3px rgba(138, 0, 69, 0.12);
}

.phone-input-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid #aaa;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.phone-input-wrap:focus-within {
    border-color: #8a0045;
    box-shadow: 0 0 0 3px rgba(138, 0, 69, 0.12);
}

.phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #f5f3f0;
    border-right: 1px solid #ccc;
    color: #333;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    user-select: none;
}

.phone-input-wrap input {
    flex: 1;
    border: none !important;
    box-shadow: none !important;
    min-width: 0;
    padding: 12px 14px;
    font-size: 16px;
    letter-spacing: 0.3px;
}

.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #777;
    line-height: 1.4;
}

.field-hint-italic {
    font-style: italic;
}

.group-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
}

.choice-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #aaa;
    background: #fff;
    overflow: hidden;
}

.choice-btn {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.choice-btn + .choice-btn {
    border-left: 1px solid #aaa;
}

.choice-btn input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.choice-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    color: #555;
    background: #fafafa;
    transition: background 0.2s, color 0.2s;
    user-select: none;
}

.choice-btn:hover .choice-label {
    background: #f3eef1;
    color: #8a0045;
}

.choice-btn input:checked + .choice-label {
    background: #8a0045;
    color: #fff;
}

.choice-btn input:focus-visible + .choice-label {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.form-links {
    text-align: right;
    margin-bottom: 24px;
    font-size: 13px;
}

.form-links a {
    color: #8a0045;
    text-decoration: underline;
}

.form-links a:hover {
    color: #6a0048;
}

.form-links span {
    color: #8a0045;
    margin: 0 2px;
}

.btn-ileri {
    width: 100%;
    padding: 14px;
    background: #8a0045;
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

.btn-ileri:active {
    background: #5a0038;
}

.btn-ileri:hover {
    background: #6a0048;
}

.security-info {
    margin-top: 28px;
    padding: 0 4px;
}

.security-info h3 {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
}

.security-info p {
    font-size: 12px;
    color: #555;
    line-height: 1.6;
}

.security-info .arrow {
    color: #888;
    margin-right: 4px;
}

.security-info a {
    color: #0066cc;
    text-decoration: underline;
}

.site-footer {
    background: linear-gradient(180deg, #f0ece6 0%, #e5e0d8 100%);
    border-top: 1px solid #ccc;
    padding: 16px 30px 12px;
}

.footer-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ssl-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #555;
    border: 1px solid #bbb;
    padding: 4px 10px;
    background: #fff;
    border-radius: 2px;
}

.ssl-icon {
    font-size: 14px;
}

.copyright {
    font-size: 12px;
    color: #555;
}

.footer-links {
    font-size: 12px;
    color: #555;
}

.footer-links a {
    color: #555;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-links span {
    margin: 0 6px;
    color: #999;
}

.error-msg {
    background: #ffebee;
    color: #c62828;
    padding: 10px 14px;
    border: 1px solid #ef9a9a;
    font-size: 13px;
    margin-bottom: 20px;
    text-align: center;
}

.success-box {
    text-align: center;
    padding: 30px 0;
}

.success-icon {
    width: 70px;
    height: 70px;
    background: #e8f5e9;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.success-icon span {
    font-size: 36px;
    color: #2e7d32;
}

.success-box h2 {
    color: #2e7d32;
    font-size: 20px;
    margin-bottom: 10px;
}

.success-box p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .site-header {
        height: 60px;
    }

    .headerLeftDiv {
        min-width: 150px;
        padding: 0 28px 0 14px;
        clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
    }

    .header-logo {
        height: 30px;
        max-width: 130px;
    }

    .header-right {
        padding-right: 16px;
    }

    .header-right span {
        font-size: 14px;
    }

    .login-main {
        padding: 24px 14px 28px;
        align-items: stretch;
    }

    .login-wrapper {
        max-width: 100%;
    }

    .login-box {
        padding: 22px 18px 26px;
        border-radius: 4px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    }

    .login-form label {
        font-size: 13px;
    }

    .login-form .form-group {
        margin-bottom: 18px;
    }

    .form-links {
        font-size: 12px;
        line-height: 1.5;
    }

    .security-info {
        margin-top: 20px;
    }

    .security-info h3 {
        font-size: 13px;
    }

    .security-info p {
        font-size: 11px;
    }

    .site-footer {
        padding: 14px 16px 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .copyright {
        font-size: 11px;
        line-height: 1.4;
    }

    .footer-links {
        font-size: 11px;
        line-height: 1.8;
    }

    .footer-links span {
        margin: 0 4px;
    }

    .success-box {
        padding: 20px 0;
    }

    .success-box h2 {
        font-size: 18px;
    }
}

@media (max-width: 380px) {
    .header-right span {
        font-size: 12px;
    }

    .phone-prefix {
        padding: 0 8px;
        font-size: 15px;
    }

    .form-links {
        text-align: center;
    }
}

/* ── Shared / Admin ── */

.container {
    width: 100%;
    max-width: 420px;
}

.btn {
    width: 100%;
    padding: 14px;
    background: #8a0045;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.btn:hover {
    background: #6a0048;
}

.card {
    background: #fff;
    border: 1px solid #ccc;
    padding: 32px 28px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #333;
    margin-bottom: 6px;
    font-weight: 700;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #aaa;
    font-size: 15px;
    outline: none;
}

.form-group input:focus {
    border-color: #8a0045;
}

/* Admin styles */
.admin-body {
    background: #f5f5f5;
    display: block;
    padding: 0;
}

.admin-header {
    background: linear-gradient(135deg, #6a1b9a, #9c27b0);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 18px;
}

.admin-header a {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    opacity: 0.8;
}

.admin-header a:hover {
    opacity: 1;
}

.admin-content {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-card .number {
    font-size: 32px;
    font-weight: 700;
    color: #6a1b9a;
}

.stat-card .label {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.table-wrap {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #f9f9f9;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #eee;
}

table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

table tr:hover {
    background: #fafafa;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.login-card {
    max-width: 400px;
    margin: 80px auto;
}

.module-settings {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.module-settings h2 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #333;
}

.module-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.module-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.module-option.active,
.module-option:has(input:checked) {
    border-color: #8a0045;
    background: #fdf5f8;
}

.module-option input {
    margin-top: 4px;
    accent-color: #8a0045;
}

.module-option strong {
    display: block;
    font-size: 14px;
    color: #222;
    margin-bottom: 4px;
}

.module-option span {
    font-size: 12px;
    color: #777;
}

.btn-save {
    margin-top: 8px;
    max-width: 220px;
}

.module-current {
    margin-top: 14px;
    font-size: 13px;
    color: #666;
}

.admin-notice {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
