/* Silco Platform - Common Styles */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #eff6ff;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --gray-light: #f9fafb;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --error: #dc2626;
    --success: #16a34a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--gray-light);
    line-height: 1.6;
}

/* Login Page */
body.login-page {
    background: linear-gradient(135deg, var(--primary-light) 0%, #dbeafe 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

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

.logo-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.logo h1 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

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

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

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-login {
    width: 100%;
    padding: 12px;
}

.btn-login:active {
    transform: translateY(1px);
}

.btn-login:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.alert {
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: none;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dashboard */
.dashboard-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
}

.header-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--gray-light);
    color: var(--text-dark);
}

.nav-link.active {
    background: var(--primary);
    color: var(--white);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
}

.btn-logout {
    padding: 8px 16px;
    font-size: 13px;
    background: transparent;
    color: var(--text-gray);
    border: 1px solid var(--border-color);
}

.btn-logout:hover {
    background: var(--gray-light);
    color: var(--text-dark);
}

/* Dashboard Content */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
}

.welcome-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 40px;
    border-radius: var(--radius-xl);
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.welcome-banner h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.welcome-banner p {
    color: rgba(255, 255, 255, 0.9);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.app-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.app-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.app-icon.blue { background: #dbeafe; }
.app-icon.purple { background: #ede9fe; }
.app-icon.green { background: #dcfce7; }

.app-card h3 {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.app-card p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
}

.section-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.section-card h2 {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 0 20px;
        height: 60px;
    }
    
    .header-nav {
        display: none;
    }
    
    .dashboard-container {
        padding: 20px 15px;
    }
    
    .welcome-banner {
        padding: 30px 20px;
    }
    
    .welcome-banner h1 {
        font-size: 24px;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
    }
}
