/**
 * NudgeNinja - Auth Pages Stylesheet
 * Shared styles for login, signup, password reset, etc.
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a7f7a 0%, #2a9d8f 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ============================================
   2. BRAND HEADER
   ============================================ */
.brand-header {
    text-align: center;
    margin-bottom: 0px;
}

.brand-logo {
    width: 170px;
    height: 170px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.brand-title {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #1a7f7a;
}

/* ============================================
   3. AUTH CONTAINERS
   ============================================ */
.auth-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    padding: 20px;
}

.auth-container-sm {
    max-width: 400px;
}

.auth-container-md {
    max-width: 480px;
}

.auth-container-lg {
    max-width: 500px;
}

/* ============================================
   4. PAGE HEADERS
   ============================================ */
.auth-page-header {
    text-align: center;
    margin-bottom: 10px;
}

.auth-page-header h1 {
    color: #333;
    font-size: 22px;
    margin-bottom: 8px;
}

.auth-page-header p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.auth-page-header .subtitle {
    color: #6b7280;
}

/* ============================================
   5. FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.required {
    color: #dc2626;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #1a7f7a;
    box-shadow: 0 0 0 3px rgba(26, 127, 122, 0.1);
}

.form-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Input Groups (subdomain + suffix) */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-suffix {
    background: #f3f4f6;
    border: 2px solid #e1e4e8;
    border-left: none;
    border-radius: 0 6px 6px 0;
    padding: 12px 14px;
    color: #6b7280;
    font-size: 14px;
    white-space: nowrap;
}

/* URL Input Wrapper */
.url-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.url-input-wrapper:focus-within {
    border-color: #1a7f7a;
}

.url-input-wrapper input {
    flex: 1;
    padding: 12px;
    border: none;
    font-size: 14px;
    outline: none;
}

.url-input-wrapper .url-suffix {
    padding: 12px;
    background: #f5f7fa;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 70px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #1a7f7a;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.2s;
}

.toggle-password:hover {
    background: #f0f0f0;
}

.toggle-password:active {
    background: #e0e0e0;
}

/* Checkbox */
.checkbox-group {
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: #666;
}

/* Section Dividers */
.section-divider {
    border-top: 1px solid #e5e7eb;
    margin: 25px 0;
    position: relative;
}

.section-divider span {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0 10px;
    color: #9ca3af;
    font-size: 12px;
    text-transform: uppercase;
}

/* ============================================
   6. BUTTONS
   ============================================ */
.btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1a7f7a 0%, #2a9d8f 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 127, 122, 0.4);
    text-decoration: none;
}

.btn-auth:active {
    transform: translateY(0);
}

/* ============================================
   7. ALERTS
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    line-height: 1.6;
}

/* ============================================
   8. LINKS & FOOTERS
   ============================================ */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.auth-footer a {
    color: #1a7f7a;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* More prominent signup CTA */
.auth-footer.signup-cta {
    margin-top: 30px;
    padding: 20px;
    background: #f0f9f8;
    border-radius: 8px;
    font-size: 15px;
}

.auth-footer.signup-cta a {
    font-weight: 700;
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: #1a7f7a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.back-link a:hover {
    text-decoration: underline;
}

/* ============================================
   9. SPECIAL ELEMENTS
   ============================================ */

/* Success Icon (checkmark circle) */
.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 40px;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

/* Company Name Highlight */
.company-name {
    color: #1a7f7a;
    font-weight: 600;
}

/* URL Preview Box */
.url-preview {
    background: #f3f4f6;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-family: monospace;
    font-size: 14px;
    color: #374151;
    word-break: break-all;
}

/* Info Box */
.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
}

.info-box h3 {
    color: #1e40af;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box p {
    color: #1e40af;
    font-size: 14px;
    line-height: 1.5;
}

/* Password Requirements Box */
.password-requirements {
    background: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}

.password-requirements h3 {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
}

.password-requirements li {
    font-size: 13px;
    color: #666;
    padding: 4px 0;
    padding-left: 24px;
    position: relative;
}

.password-requirements li:before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Workspace Hint */
.workspace-hint {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}
