@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #1c1c1e;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container, .login-container {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #1c1c1e;
    position: relative;
}

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
}

.menu-icon {
    cursor: pointer;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
    text-align: center;
    width: 100%;
}

.app-icon {
    margin-bottom: 30px;
    border-radius: 26px;
}

h1 {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 15px;
    line-height: 1.4;
    color: #a1a1a6;
    margin-bottom: 40px;
}

.login-button {
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 24px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 30px;
    width: 200px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.login-button:hover {
    background-color: #e0e0e0;
}

.login-button:active {
    transform: scale(0.96);
}

.learn-more {
    color: #2997ff;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s ease;
}

.learn-more:hover {
    opacity: 0.7;
}

.learn-more svg {
    margin-top: 1px;
}

/* Login Page Styles */
.login-page {
    background-color: #1c1c1e;
}

.login-container {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #1c1c1e;
    position: relative;
}

.login-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 24px 40px 24px;
    align-items: center;
    text-align: center;
    width: 100%;
}

.logo-circle-container {
    margin-top: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

h2 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
}

.input-group {
    width: 100%;
    margin-bottom: 12px;
}

.login-input {
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #444;
    background-color: transparent;
    color: white;
    font-size: 17px;
    outline: none;
    transition: border-color 0.2s;
}

.login-input:focus {
    border-color: #007aff;
}

.login-input::placeholder {
    color: #a1a1a6;
}

/* Step 2 Grouped Inputs */
.grouped-inputs {
    border: 1px solid #444;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    text-align: left;
    background-color: transparent;
}

.input-cell {
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
}

.small-label {
    font-size: 12px;
    color: #a1a1a6;
    margin-bottom: 2px;
}

.borderless-input {
    border: none;
    background: transparent;
    color: white;
    font-size: 17px;
    outline: none;
    width: 100%;
}

.separator {
    height: 1px;
    background-color: #444;
}

.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a1a1a6;
    cursor: pointer;
}

.apple-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid #666;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    background-color: transparent;
}

.apple-checkbox:checked {
    background-color: transparent;
    border-color: #666;
}

.apple-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.link-group {
    width: 100%;
    text-align: left;
    margin-bottom: 40px;
}

.blue-link {
    color: #2997ff;
    text-decoration: none;
    font-size: 15px;
}

.blue-link:hover {
    text-decoration: underline;
}

.blue-link.small {
    font-size: 14px;
}

.info-box {
    display: flex;
    gap: 16px;
    text-align: left;
    margin-bottom: 40px;
}

.info-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.info-text {
    font-size: 13px;
    line-height: 1.4;
    color: #a1a1a6;
}

.info-text a {
    display: inline-block;
    margin-top: 4px;
}

.actions {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-bottom: 12px;
}

.btn-primary {
    flex: 1;
    padding: 14px 0;
    border-radius: 12px;
    border: none;
    background-color: #007aff;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background-color: #0062cc;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    flex: 1.2;
    padding: 14px 0;
    border-radius: 12px;
    border: none;
    background-color: #ffffff;
    color: #000000;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-secondary:active {
    transform: scale(0.98);
}

.requirements {
    font-size: 12px;
    color: #a1a1a6;
    margin-top: 4px;
}

/* Passcode Page Styles */
.passcode-dots {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    margin-top: 10px;
}

.passcode-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #ffffff;
    background-color: transparent;
}

.passcode-dots .dot.filled {
    background-color: #ffffff;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 24px;
    width: 280px;
    margin: 0 auto 50px auto;
}

.keypad .key {
    background-color: #ffffff;
    color: #000000;
    border-radius: 50%;
    width: 75px;
    height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.1s;
}

.keypad .key:active {
    background-color: #d1d1d6;
}

.keypad .key.empty {
    background-color: transparent;
    cursor: default;
}

.keypad .key .number {
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
}

.keypad .key .letters {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 2px;
}

.btn-entrar {
    background-color: #1c3c5e; /* subtle dark blue */
    color: #ffffff;
    border: none;
    border-radius: 24px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-entrar:hover {
    background-color: #234b75;
}

/* Pattern Lock CSS */
.pattern-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 20px auto;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.pattern-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    z-index: 2;
}
.pattern-dot-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}
.pattern-dot {
    width: 10px;
    height: 10px;
    background-color: #5f6368;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
}
.pattern-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.pattern-dot.active {
    background-color: #8ab4f8;
}
.pattern-dot.active::after {
    border-color: rgba(138, 180, 248, 0.4);
    background-color: rgba(138, 180, 248, 0.1);
}
.pattern-dot.pattern-dot-error {
    background-color: #ea4335 !important;
}
.pattern-dot.pattern-dot-error::after {
    border-color: rgba(234, 67, 53, 0.4) !important;
    background-color: rgba(234, 67, 53, 0.1) !important;
}
.pattern-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
.pattern-line {
    stroke: #8ab4f8;
    stroke-width: 4;
    stroke-linecap: round;
    opacity: 0.8;
}
.pattern-line-error {
    stroke: #ea4335 !important;
}
