/* Forge - Professional Styling */

:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --secondary: #4a5568;
    --accent: #3182ce;
    --success: #38a169;
    --warning: #d69e2e;
    --error: #e53e3e;
    --bg: #f7fafc;
    --bg-card: #ffffff;
    --text: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    background: var(--primary);
    color: white;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    height: 60px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    margin-left: 3rem;
}

.nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    border-bottom-color: var(--accent);
}

.nav-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user span {
    color: rgba(255,255,255,0.8);
}

/* Container */
.container {
    max-width: 1800px;
    width: 95%;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

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

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

.btn-secondary:hover {
    background: var(--text);
}

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

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

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

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    font-weight: 600;
    color: var(--text);
    background: var(--bg);
}

.table tr:hover {
    background: var(--bg);
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash {
    padding: 0.875rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.flash-success {
    background: #c6f6d5;
    color: #22543d;
}

.flash-error {
    background: #fed7d7;
    color: #742a2a;
}

.flash-info {
    background: #bee3f8;
    color: #2a4365;
}

.flash-warning {
    background: #fefcbf;
    color: #744210;
}

/* Login Page - Dell Technologies flowing gradient background */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b1a2e;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 70% 80%, rgba(0, 118, 206, 0.35) 0%, transparent 45%),
        radial-gradient(ellipse at 30% 20%, rgba(0, 98, 180, 0.25) 0%, transparent 40%),
        radial-gradient(ellipse at 85% 30%, rgba(0, 150, 230, 0.2) 0%, transparent 35%),
        radial-gradient(ellipse at 15% 70%, rgba(0, 80, 160, 0.15) 0%, transparent 50%);
    animation: flowShift 25s ease-in-out infinite;
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 80%;
    height: 80%;
    background: radial-gradient(ellipse at center, rgba(0, 118, 206, 0.18) 0%, transparent 60%);
    border-radius: 50%;
    animation: driftOrb 20s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes flowShift {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -1%) rotate(1deg); }
    66% { transform: translate(-1%, 2%) rotate(-1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes driftOrb {
    0% { transform: translate(0, 0) scale(1); opacity: 0.8; }
    50% { transform: translate(-5%, -3%) scale(1.1); opacity: 1; }
    100% { transform: translate(3%, 2%) scale(0.95); opacity: 0.7; }
}

.auth-container {
    max-width: 420px;
    width: 100%;
    margin: 2rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 118, 206, 0.15);
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
}

.auth-card .form-label {
    color: rgba(255, 255, 255, 0.9);
}

.auth-card .form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.auth-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.auth-card .form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(0, 118, 206, 0.6);
    box-shadow: 0 0 12px rgba(0, 118, 206, 0.3);
    outline: none;
}

.auth-card .btn-primary {
    background: #0076ce;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-card .btn-primary:hover {
    background: #0066b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 118, 206, 0.4);
}

.auth-card span,
.auth-card small,
.auth-card p {
    color: rgba(255, 255, 255, 0.7);
}

.auth-card a {
    color: rgba(100, 180, 255, 0.9);
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Project Cards */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg);
    border-radius: 6px;
    transition: background 0.2s;
}

.project-item:hover {
    background: var(--border);
}

.project-info h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.project-meta {
    color: var(--text-light);
    font-size: 0.8125rem;
}

.status-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-draft {
    background: #e2e8f0;
    color: var(--secondary);
}

.status-generated {
    background: #c6f6d5;
    color: #22543d;
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.file-upload:hover {
    border-color: var(--accent);
}

.file-upload input[type="file"] {
    display: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1rem;
    color: var(--text-light);
    font-size: 0.8125rem;
    border-top: 1px solid var(--border);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 1rem;
    }

    .nav-links {
        order: 3;
        width: 100%;
        margin: 1rem 0 0 0;
        justify-content: center;
    }

    .container {
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
