/* Muvon Contracts System - Theme CSS */

:root {
    --muvon-orange: #f58844;
    --muvon-teal: #037e8a;
    --muvon-white: #ffffff;
    --muvon-dark: #333333;
    --muvon-light-gray: #f8f9fa;
    --muvon-border: #e9ecef;
    --muvon-success: #28a745;
    --muvon-error: #dc3545;
    --muvon-warning: #ffc107;
}

/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--muvon-white);
    color: var(--muvon-dark);
    line-height: 1.6;
}

/* Header z logo */
.muvon-header {
    background: var(--muvon-orange);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.muvon-logo {
    max-height: 60px;
    width: auto;
    filter: brightness(0) invert(1); /* Biały logo na kolorowym tle */
}

.muvon-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Formularz kandydata */
.candidate-form-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--muvon-white);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.candidate-form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--muvon-light-gray);
}

.candidate-form-header h1 {
    color: var(--muvon-teal);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.candidate-form-header p {
    color: #666;
    font-size: 1.1rem;
}

.form-description {
    font-style: italic;
    color: #888;
}

/* Google Drive link styling */
.drive-link-description {
    margin: 1rem 0;
}

.drive-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muvon-orange);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.drive-link:hover {
    color: #e67e22;
    background-color: rgba(245, 136, 68, 0.1);
    transform: translateY(-2px);
}

.drive-icon {
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Pola formularza */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-label.required::after {
    content: " *";
    color: var(--muvon-orange);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--muvon-border);
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--muvon-orange);
    box-shadow: 0 0 0 3px rgba(245, 136, 68, 0.1);
}

.form-input.error {
    border-color: var(--muvon-error);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-error {
    color: var(--muvon-error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-error.show {
    display: block;
}

/* Przyciski */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 136, 68, 0.3);
}

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

.btn-secondary:hover {
    background: #025a63;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(3, 126, 138, 0.3);
}

.btn-full {
    width: 100%;
}

/* Panel administratora */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--muvon-dark);
    min-height: 100vh;
    width: 250px;
    position: fixed;
    left: 0;
    top: 0;
    padding: 2rem 0;
}

.admin-sidebar .muvon-logo {
    max-height: 40px;
    margin-bottom: 2rem;
    padding: 0 2rem;
}

.admin-nav {
    list-style: none;
}

.admin-nav li {
    margin-bottom: 0.5rem;
}

.admin-nav a {
    display: block;
    padding: 0.75rem 2rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--muvon-orange);
    color: white;
}

.admin-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
    width: calc(100% - 250px);
}

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

/* Karty */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.card-title {
    color: var(--muvon-teal);
    font-size: 1.5rem;
    margin: 0;
}

/* Tabele */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

.table th {
    background: var(--muvon-light-gray);
    font-weight: 600;
    color: var(--muvon-dark);
}

.table tr:hover {
    background: var(--muvon-light-gray);
}

/* Statusy */
.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-draft {
    background: #f8f9fa;
    color: #6c757d;
}

.status-pending {
    background: #e2e3e5;
    color: #383d41;
}

.status-in-progress {
    background: #cce5ff;
    color: var(--muvon-teal);
}

.status-completed {
    background: #d4edda;
    color: var(--muvon-success);
}

.status-cancelled {
    background: #f8d7da;
    color: var(--muvon-error);
}

/* Alerty */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsywność */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
        width: 100%;
    }
    
    .candidate-form-container {
        margin: 1rem;
        padding: 1rem;
    }
    
    .muvon-header-content {
        padding: 0 1rem;
    }
}

/* Animacje */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--muvon-light-gray);
    border-radius: 50%;
    border-top-color: var(--muvon-orange);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Contract details styling */
.contract-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.contract-details-expanded {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 5px;
    border: 1px solid var(--muvon-border);
}

.toggle-details {
    margin-top: 0.5rem;
}

.toggle-icon {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

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

.section-header h3 {
    margin: 0;
}

.candidate-edit-form {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid var(--muvon-border);
    margin-top: 1rem;
}

.google-drive-btn {
    margin-left: 1rem;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

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

/* Generation details styling */
.generation-actions {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.toggle-generation-details {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.generated-files {
    margin-top: 1rem;
    padding: 1rem;
    background: #e8f5e8;
    border-radius: 4px;
    border-left: 4px solid #28a745;
}


/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: #6c757d; font-style: italic; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }
