/* ==========================================================================
   SignAuto - Custom Styles
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #1e293b;
    --light: #f8fafc;
    --body-bg: #f1f5f9;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.2s ease-in-out;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--body-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Login Page
   ========================================================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-left {
    flex: 1;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: white;
}

.login-left-content {
    max-width: 480px;
    text-align: center;
}

.login-left h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.login-left p {
    font-size: 1.125rem;
    opacity: 0.9;
}

.login-left .features {
    margin-top: 3rem;
    text-align: left;
}

.login-left .feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.login-left .feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: white;
}

.login-box {
    width: 100%;
    max-width: 420px;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 48px;
    margin-bottom: 1rem;
}

.login-logo h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.login-form .form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-form .form-control {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.login-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-form .input-group-text {
    background: var(--light);
    border: 1px solid var(--border-color);
    border-right: none;
    color: var(--text-secondary);
}

.login-form .input-group .form-control {
    border-left: none;
}

.login-form .input-group:focus-within .input-group-text {
    border-color: var(--primary);
}

.login-form .btn-primary {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    transition: var(--transition);
}

.login-form .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.login-form .btn-primary:active {
    transform: translateY(0);
}

.login-form .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-links {
    text-align: center;
    margin-top: 1.5rem;
}

.login-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.login-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.login-divider span {
    padding: 0 1rem;
}

/* Password toggle */
.password-toggle {
    position: relative;
}

.password-toggle .toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle .toggle-btn:hover {
    color: var(--text-primary);
}

.password-toggle .form-control {
    padding-right: 40px;
}

/* Alert customization */
.alert {
    border: none;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
}

/* Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* Responsive */
@media (min-width: 992px) {
    .login-left {
        display: flex;
    }
    
    .login-right {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 1200px) {
    .login-right {
        flex: 0 0 45%;
        max-width: 45%;
    }
}

/* ==========================================================================
   Dashboard Layout (para depois)
   ========================================================================== */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--dark);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: var(--transition);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    transition: var(--transition);
}

.topbar {
    height: 64px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.content-wrapper {
    padding: 1.5rem;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-light { background-color: var(--light) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

.rounded { border-radius: var(--radius) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
