/* SmartInfra Accounts - Main Stylesheet */

/* ===== CSS Variables ===== */
:root {
    --primary-navy: #1e2742;
    --primary-teal: #5eb0a9;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-light: #ffffff;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --success: #48bb78;
    --warning: #ed8936;
    --error: #f56565;
    --info: #4299e1;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--primary-navy);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--primary-teal);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #4a9892;
}

/* ===== Container & Layout ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    min-height: calc(100vh - 200px);
}

/* ===== Navigation Bar ===== */
.navbar {
    background-color: var(--primary-navy);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: -0.5px;
}

.navbar-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-teal);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: #4a9892;
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-teal);
    border: 2px solid var(--primary-teal);
}

.btn-secondary:hover {
    background-color: var(--primary-teal);
    color: var(--text-light);
}

.btn-danger {
    background-color: var(--error);
    color: var(--text-light);
}

.btn-danger:hover {
    background-color: #e53e3e;
    color: var(--text-light);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-navy) 0%, #2d3e5f 100%);
    color: var(--text-light);
    padding: 6rem 0;
    text-align: center;
}

.hero-content h1 {
    color: var(--text-light);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Features Section ===== */
.features, .apps-section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.features-grid, .apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card, .app-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.feature-card:hover, .app-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3, .app-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-navy);
}

/* ===== CTA Section ===== */
.cta-section {
    background-color: var(--primary-teal);
    color: var(--text-light);
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* ===== Authentication Forms ===== */
.auth-section {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.auth-card {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.auth-card h1 {
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.auth-form {
    margin-top: 2rem;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.forgot-password {
    font-size: 0.875rem;
    display: block;
    text-align: right;
    margin-bottom: 1rem;
}

.success-icon {
    font-size: 4rem;
    color: var(--success);
    text-align: center;
    margin-bottom: 1rem;
}

/* ===== Form Styles ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-navy);
}

.form-input, input[type="text"], input[type="email"], input[type="password"], textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus, input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(94, 176, 169, 0.1);
}

.form-errors {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.form-actions {
    margin-top: 1.5rem;
}

/* ===== Profile Section ===== */
.profile-section {
    padding: 3rem 0;
}

.profile-header {
    margin-bottom: 2rem;
}

.profile-header h1 {
    margin-bottom: 0.5rem;
}

.profile-header p {
    color: var(--text-secondary);
}

.profile-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.profile-sidebar {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.profile-avatar {
    text-align: center;
    margin-bottom: 2rem;
}

.avatar-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-navy), var(--primary-teal));
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 auto 1rem;
}

.profile-avatar h3 {
    margin-bottom: 0.25rem;
}

.text-muted {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-nav-link {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: background-color 0.3s ease;
}

.profile-nav-link:hover, .profile-nav-link.active {
    background-color: rgba(94, 176, 169, 0.1);
    color: var(--primary-teal);
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ===== Card Component ===== */
.card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card h2, .card h3 {
    margin-bottom: 1.5rem;
}

/* ===== Info Grid ===== */
.info-grid {
    display: grid;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
}

/* ===== Subscriptions List ===== */
.subscriptions-list, .apps-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.subscription-item, .app-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.3s ease;
}

.subscription-item:hover, .app-item:hover {
    border-color: var(--primary-teal);
}

.subscription-info h3, .app-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.subscription-info p, .app-info p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.subscription-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.subscription-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.subscription-actions, .app-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===== Status Badges ===== */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-active {
    background-color: rgba(72, 187, 120, 0.1);
    color: var(--success);
}

.status-trial {
    background-color: rgba(66, 153, 225, 0.1);
    color: var(--info);
}

.status-expired {
    background-color: rgba(237, 137, 54, 0.1);
    color: var(--warning);
}

.status-cancelled {
    background-color: rgba(245, 101, 101, 0.1);
    color: var(--error);
}

/* ===== Messages/Alerts ===== */
.messages-container {
    position: sticky;
    top: 70px;
    z-index: 999;
}

.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.alert-success {
    background-color: rgba(72, 187, 120, 0.1);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-error {
    background-color: rgba(245, 101, 101, 0.1);
    color: var(--error);
    border-left: 4px solid var(--error);
}

.alert-warning {
    background-color: rgba(237, 137, 54, 0.1);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert-info {
    background-color: rgba(66, 153, 225, 0.1);
    color: var(--info);
    border-left: 4px solid var(--info);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--primary-navy);
    color: var(--text-light);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-light);
}

.footer-links a:hover {
    color: var(--primary-teal);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .navbar-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .profile-content {
        grid-template-columns: 1fr;
    }
    
    .subscription-item, .app-item {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .subscription-actions, .app-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .subscription-actions .btn, .app-actions .btn {
        width: 100%;
    }
    
    .footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}
