/* PeekEOS Cloud — Shared base styles */

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Body */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #0f1923;
    color: #e0e0e0;
    min-height: 100vh;
}

/* Card container */
.card {
    background: #1a2733;
    border: 1px solid #2a3a4a;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
}

/* Typography */
h1 { text-align: center; font-size: 22px; margin-bottom: 4px; color: #fff; }
.subtitle { text-align: center; color: #888; margin-bottom: 24px; font-size: 14px; }

/* Form elements */
label { display: block; margin-bottom: 4px; font-size: 13px; color: #aaa; }
label .req { color: #e74c3c; }

input, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #2a3a4a;
    border-radius: 6px;
    background: #0f1923;
    color: #e0e0e0;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.4;
    margin-bottom: 12px;
    box-sizing: border-box;
    height: 42px;
}
input:focus, select:focus { outline: none; border-color: #3a7bd5; }
input[readonly] { opacity: 0.6; cursor: not-allowed; }

input::placeholder { color: #555 !important; opacity: 1 !important; }
input::-webkit-input-placeholder { color: #555 !important; opacity: 1 !important; }

/* Buttons */
button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: #3a7bd5;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}
button:hover { background: #2e6bc4; }
.btn-danger { background: #c0392b; }
.btn-danger:hover { background: #a93226; }
.btn-outline { background: transparent; border: 1px solid #3a7bd5; color: #3a7bd5; }
.btn-outline:hover { background: #3a7bd520; }

/* Alerts */
.error {
    background: #5c2020;
    border: 1px solid #8b3030;
    color: #ff9999;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}
.success {
    background: #1a4a2a;
    border: 1px solid #2a7a3a;
    color: #99ff99;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}

/* Utilities */
.sep { border: none; border-top: 1px solid #2a3a4a; margin: 16px 0; }
.opt { color: #666; font-size: 12px; margin-bottom: 16px; }
.links { text-align: center; margin-top: 16px; font-size: 13px; }
.links a { color: #3a7bd5; text-decoration: none; }
.links a:hover { text-decoration: underline; }

/* Layout helpers */
.row { display: flex; gap: 12px; }
.row > div { flex: 1; }
.row-narrow > div:first-child { flex: 3; }
.row-narrow > div:last-child { flex: 1; }

/* Password policy tooltip */
.pw-info { position: relative; cursor: help; color: #666; }
.pw-info .pw-tip {
    display: none;
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a2733;
    border: 1px solid #2a3a4a;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 11px;
    color: #ccc;
    white-space: nowrap;
    z-index: 10;
    font-weight: normal;
}
.pw-info:hover .pw-tip { display: block; }

/* Centered form layout (login, register, account, etc.) */
.page-center {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 30px 16px;
}
.page-center-middle {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

/* Mobile responsive */
@media (max-width: 639px) {
    .card { padding: 16px; border-radius: 8px; }
    .page-center, .page-center-middle { padding: 8px; }
    input, select { padding: 8px 10px; font-size: 14px; margin-bottom: 10px; }
    label { margin-bottom: 3px; font-size: 12px; }
    button { padding: 10px; font-size: 14px; }
    h1 { font-size: 18px; }
    .subtitle { font-size: 13px; margin-bottom: 16px; }
    .sep { margin: 12px 0; }
    .row { gap: 8px; }
}
