/* Reset și Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --primary-hover: #0052a3;
    --secondary-color: #666;
    --secondary-hover: #555;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 6px 20px rgba(0,102,204,0.15);
    --radius: 8px;
    --radius-sm: 4px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Home Page */
.home-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
}

.home-content {
    background: var(--white);
    padding: 60px 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.logo-section {
    margin-bottom: 50px;
}

.home-content h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #222;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 18px;
    color: var(--text-light);
}

.role-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 50px 0;
}

.role-button {
    display: block;
    padding: 40px 30px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.role-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.role-button:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.role-button:hover::before {
    transform: translateY(0);
}

.role-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.role-button h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.role-button p {
    font-size: 16px;
    color: var(--text-light);
}

.role-button:hover h2 {
    color: var(--primary-color);
}

.footer-info {
    margin-top: 40px;
    font-size: 14px;
    color: var(--text-light);
}

/* Header */
.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a.active::after {
    transform: scaleX(1);
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-color);
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.back-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-color);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: border-color 0.2s;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: var(--white);
    color: var(--text-color);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-secondary {
    background: #f8f9fa;
    color: var(--text-color);
    border-color: #ddd;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.btn-small {
    padding: 6px 16px;
    font-size: 14px;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #e6f3e6;
    color: #2e7d32;
    border: 1px solid #c3e6c3;
}

.alert-info {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-box {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-box h3 {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Tables */
.data-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-top: 20px;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.data-table tr:not(:last-child) td {
    border-bottom: 1px solid #f0f0f0;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table td a {
    margin-right: 8px;
}

/* Actions Box */
.actions-box,
.recent-projects,
.projects-section {
    background: var(--white);
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius);
    margin-top: 25px;
    box-shadow: none;
}

.actions-box h2,
.recent-projects h2,
.projects-section h2 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.actions-box .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Utilities */
.no-data {
    text-align: center;
    color: var(--text-light);
    padding: 60px 20px;
    font-size: 18px;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-menu span {
    color: var(--text-light);
    font-weight: 500;
}

/* Dashboard Welcome */
.welcome-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    color: #333;
    padding: 30px;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.welcome-section h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #222;
    font-weight: 600;
}

.welcome-section p {
    font-size: 16px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .role-selection {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .home-content {
        padding: 40px 20px;
    }
    
    .data-table {
        font-size: 14px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .main-header,
    .user-menu,
    .btn,
    .actions-box {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .container {
        max-width: 100%;
    }
}