/**
 * styles.css - სტილების ფაილი
 * შეიცავს ყველა ვიზუალურ სტილს
 */

/* ====== გლობალური სტილები ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ძირითადი ფონტი და ფონი */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

/* კონტეინერი */
.container {
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-in;
}

/* ====== შესვლის ფორმა ====== */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: slideDown 0.5s ease-out;
}

.login-container h2 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 24px;
}

.login-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    color: #6b7280;
}

/* ====== ფორმის ელემენტები ====== */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: #f9fafb;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* ====== ღილაკები ====== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8, #6b4199);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6b7280;
    color: white;
    padding: 8px 16px;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-logout {
    background: #ef4444;
    color: white;
    padding: 8px 16px;
}

.btn-logout:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.btn-change-password {
    background: #f59e0b;
    color: white;
    padding: 8px 16px;
}

.btn-change-password:hover {
    background: #d97706;
    transform: scale(1.05);
}

.btn-export {
    background: #10b981;
    color: white;
    padding: 8px 16px;
}

.btn-export:hover {
    background: #059669;
    transform: scale(1.05);
}

.btn-edit {
    background: #10b981;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
}

.btn-edit:hover {
    background: #059669;
}

.btn-save {
    background: #3b82f6;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
}

.btn-save:hover {
    background: #2563eb;
}

.btn-cancel {
    background: #6b7280;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
}

.btn-cancel:hover {
    background: #4b5563;
}

/* ====== მთავარი პანელი ====== */
.main-panel {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease-in;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.header h1 {
    color: #333;
    font-size: 24px;
    margin-bottom: 5px;
}

.header small {
    color: #6b7280;
}

.header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ====== სტატისტიკა ====== */
.statistics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}

.stat-value {
    color: #111827;
    font-size: 20px;
    font-weight: bold;
}

/* ====== ფილტრების სექცია ====== */
.filter-section {
    background: #f9fafb;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.filter-section h3 {
    color: #374151;
    margin-bottom: 15px;
    font-size: 16px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* ====== ცხრილი ====== */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 500;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

tr:hover {
    background: #f9fafb;
}

tr:nth-child(even) {
    background: #fafafa;
}

.actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* რედაქტირების რეჟიმი */
.edit-mode {
    width: 100%;
    max-width: 200px;
}

.view-mode {
    cursor: default;
}

/* ====== პაგინაცია ====== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-weight: 500;
}

.page-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.page-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.page-info {
    color: #6b7280;
    font-size: 14px;
    margin-left: 10px;
}

/* ====== მოდალური ფანჯარა ====== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 15px;
    animation: slideDown 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.modal-header h2 {
    color: #333;
    font-size: 20px;
}

.close {
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
    transition: color 0.3s;
}

.close:hover {
    color: #ef4444;
}

/* ====== შეტყობინებები ====== */
.error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #ef4444;
    animation: slideIn 0.3s ease;
}

.success {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #14532d;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #10b981;
    animation: slideIn 0.3s ease;
}

/* ====== ანიმაციები ====== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ====== რესპონსიული დიზაინი ====== */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-panel {
        padding: 20px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: scroll;
    }
    
    table {
        min-width: 800px;
    }
    
    .pagination {
        padding: 10px;
    }
    
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

/* ====== პრინტერის სტილები ====== */
@media print {
    body {
        background: white;
    }
    
    .header-buttons,
    .filter-section,
    .pagination,
    .actions {
        display: none !important;
    }
    
    .main-panel {
        box-shadow: none;
        padding: 0;
    }
}