/* ============================================
   Scrap Tracking - Main Stylesheet
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

/* ============================================
   Navbar (Header) - Mantieni stile originale
   ============================================ */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar a {
    color: white;
    text-decoration: none;
    margin-right: 2rem;
    transition: opacity 0.2s;
}

.navbar a:hover {
    opacity: 0.8;
}

.navbar-logout {
    float: right;
}

/* ============================================
   Container
   ============================================ */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ============================================
   Card moderna
   ============================================ */
.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #334155;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.card p {
    color: #64748b;
    margin-bottom: 1rem;
}

/* ============================================
   Bottoni moderni
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.3);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    box-shadow: none;
}

.btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.btn-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
}

.btn-purple:hover {
    box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.4);
}

.welcome-text {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.welcome-text strong {
    color: #1e293b;
}

.section-spacing {
    margin-top: 2rem;
}

.section-spacing-large {
    margin-top: 2.5rem;
}

.badge-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.inline-form {
    display: inline;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #d1d5db;
}

/* ============================================
   Alert
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #a7f3d0;
}

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

/* ============================================
   Tabelle moderne
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

table th,
table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table tbody tr {
    transition: background-color 0.2s;
}

table tbody tr:hover {
    background-color: #f8fafc;
}

/* ============================================
   Badge/Status
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-gray {
    background: #f1f5f9;
    color: #475569;
}

/* ============================================
   Lista
   ============================================ */
ul,
ol {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

li {
    margin-bottom: 0.5rem;
    color: #64748b;
}

/* ============================================
   Utility classes
   ============================================ */
.info-box {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

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

.info-box-grid p {
    margin: 0;
}

.info-box-grid strong {
    color: #475569;
}

.info-box-grid span {
    color: #1e293b;
}

.info-box-grid-full {
    grid-column: 1 / -1;
}

.text-muted {
    color: #64748b;
    margin: 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card-section {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.card-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.card-section-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-section-content p {
    margin: 0;
}

.card-section-content strong {
    color: #475569;
}

.card-section-content span {
    color: #1e293b;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f1f5f9;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .card h1 {
        font-size: 1.5rem;
    }

    .card h2 {
        font-size: 1.25rem;
    }

    table {
        font-size: 0.875rem;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem;
    }

    .info-box-grid {
        grid-template-columns: 1fr;
    }

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

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .action-buttons {
        width: 100%;
    }

.action-buttons .btn {
    flex: 1;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-small + .btn-small {
    margin-left: 0.5rem;
}
}

@media (max-width: 480px) {
    .navbar {
        padding: 1rem;
    }

    .navbar a {
        margin-right: 1rem;
        font-size: 0.875rem;
    }

    .card {
        padding: 1.25rem;
    }

    .card h1 {
        font-size: 1.25rem;
    }
}

