/* Peñasquito - Soil Moisture Monitoring Login Page Styles */

:root {
    /* Sand Tan & Night Blue Theme */
    --primary-color: #e1b382;        /* Sand tan */
    --primary-hover: #c89666;        /* Sand tan shadow */
    --background: #12343b;           /* Night blue shadow - deep */
    --surface: #2d545e;              /* Night blue */
    --surface-light: #3d646e;        /* Lighter night blue */
    --text-primary: #f5f3ed;         /* Light beige text */
    --text-secondary: #e1b382;       /* Sand tan for secondary text */
    --border-color: #c89666;         /* Sand tan shadow border */
    --success: #2d7a3e;              /* Healthy plant green */
    --error: #c44536;                /* Dry soil warning red */
    --shadow: rgba(18, 52, 59, 0.6);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #12343b 0%, #2d545e 50%, #3d646e 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 48px;
    margin-bottom: 16px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.app-name {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #e1b382 0%, #f5d5b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.app-tagline {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.login-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 25px -5px var(--shadow), 0 8px 10px -6px var(--shadow);
    border: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.card-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: 0.3px;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(225, 179, 130, 0.3);
}

.form-input::placeholder {
    color: #64748b;
}

.btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #2d545e;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 179, 130, 0.5);
}

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

.btn:disabled {
    background: var(--surface-light);
    cursor: not-allowed;
    transform: none;
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 16px;
}

.demo-credentials {
    background: var(--background);
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
    border-left: 3px solid var(--primary-color);
}

.demo-credentials h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.credential-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.credential-label {
    color: var(--text-secondary);
}

.credential-value {
    color: var(--primary-color);
    font-weight: 600;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: rgba(196, 69, 54, 0.15);
    border: 1px solid var(--error);
    color: #f5b8ae;
}

.alert-success {
    background: rgba(45, 122, 62, 0.15);
    border: 1px solid var(--success);
    color: #a8e6bc;
}

.footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

.footer p:first-child {
    font-weight: 500;
    letter-spacing: 0.3px;
}

.footer a {
    color: #e1b382;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #f5d5b0;
    text-decoration: underline;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 24px;
    }

    .app-name {
        font-size: 28px;
    }

    .logo {
        font-size: 40px;
    }
}
