/* ========================================
   СИСТЕМА ЗАКАЗА ПОЛИГРАФИИ - СТИЛИ
   Краснодарская краевая библиотека им. Пушкина
   ======================================== */

/* СБРОС СТИЛЕЙ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ПЕРЕМЕННЫЕ (только для современных браузеров) */
:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    --light-color: #f8f9fa;
    --dark-color: #333;
    --gray-color: #666;
    --border-color: #e9ecef;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 6px 20px rgba(0,0,0,0.15);
}

/* ОБЩИЕ СТИЛИ */
.spts-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* КНОПКА СТАРОГО БРАУЗЕРА */
.spts-old-browser-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255,107,107,0.4);
    z-index: 10000;
    transition: all 0.3s ease;
    font-size: 14px;
}

.spts-old-browser-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.6);
}

/* КОНТЕЙНЕР */
.spts-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* ХЕДЕР */
.spts-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
    text-align: center;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(102,126,234,0.3);
}

.spts-header h1 {
    font-size: 2em;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.spts-header p {
    font-size: 1.1em;
    opacity: 0.95;
    margin: 0;
}

/* КАРТОЧКИ - СОВРЕМЕННЫЙ РЕЖИМ */
.spts-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.spts-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid #e9ecef;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.spts-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.spts-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #667eea;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
    border-radius: 12px 0 0 12px;
}

.spts-card:hover::before {
    transform: scaleY(1);
}

.spts-card-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #667eea;
    text-align: center;
}

.spts-card h3 {
    font-size: 1.3em;
    color: #333;
    margin: 0 0 12px 0;
    font-weight: 600;
    line-height: 1.3;
}

.spts-card p {
    font-size: 0.95em;
    color: #666;
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
}

.spts-card-footer {
    margin-top: 15px;
    text-align: center;
}

.spts-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

/* АНИМАЦИИ ПОЯВЛЕНИЯ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spts-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.spts-card:nth-child(1) { animation-delay: 0.1s; }
.spts-card:nth-child(2) { animation-delay: 0.2s; }
.spts-card:nth-child(3) { animation-delay: 0.3s; }
.spts-card:nth-child(4) { animation-delay: 0.4s; }
.spts-card:nth-child(5) { animation-delay: 0.5s; }

/* БЛОК ПОЛЬЗОВАТЕЛЯ */
.spts-user-block {
    background: #e3f2fd;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    border: 1px solid #bbdefb;
}

.spts-user-block h3 {
    font-size: 1.4em;
    color: #1976d2;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.spts-user-block p {
    margin: 8px 0;
    color: #333;
    font-size: 0.95em;
}

.spts-user-info {
    margin-bottom: 15px;
}

.spts-user-info strong {
    color: #1565c0;
}

/* ССЫЛКИ И КНОПКИ */
.spts-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.spts-btn {
    display: inline-block;
    padding: 10px 25px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    text-align: center;
}

.spts-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.spts-btn:active {
    transform: translateY(0);
}

.spts-btn-success {
    background: #4caf50;
}

.spts-btn-success:hover {
    background: #45a049;
}

.spts-btn-danger {
    background: #f44336;
}

.spts-btn-danger:hover {
    background: #e53935;
}

.spts-btn-warning {
    background: #ff9800;
}

.spts-btn-warning:hover {
    background: #f57c00;
}

.spts-btn-info {
    background: #2196f3;
}

.spts-btn-info:hover {
    background: #1976d2;
}

.spts-btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.spts-btn-outline:hover {
    background: #667eea;
    color: white;
}

/* ФУТЕР */
.spts-footer {
    text-align: center;
    padding: 25px;
    background: #f8f9fa;
    color: #666;
    font-size: 0.85em;
    border-top: 1px solid #e9ecef;
    margin-top: 30px;
}

.spts-footer p {
    margin: 5px 0;
}

/* ТАБЛИЦЫ */
.spts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.spts-table th {
    background: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.spts-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.spts-table tr:last-child td {
    border-bottom: none;
}

.spts-table tr:hover {
    background: #f8f9fa;
}

/* ФОРМЫ */
.spts-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.spts-form-group {
    margin-bottom: 20px;
}

.spts-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.spts-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

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

.spts-form-control:disabled {
    background: #f8f9fa;
    cursor: not-allowed;
}

.spts-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.spts-form-col {
    flex: 1;
}

/* СТАТУСЫ */
.spts-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
}

.spts-status-new {
    background: #fff3e0;
    color: #e65100;
}

.spts-status-processing {
    background: #e3f2fd;
    color: #1565c0;
}

.spts-status-ready {
    background: #e8f5e9;
    color: #2e7d32;
}

.spts-status-completed {
    background: #f3e5f5;
    color: #4a148c;
}

/* СЕКЦИИ */
.spts-section {
    margin-bottom: 30px;
}

.spts-section-title {
    font-size: 1.6em;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #667eea;
    font-weight: 700;
}

/* АЛЕРТЫ */
.spts-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.spts-alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left-color: #4caf50;
}

.spts-alert-danger {
    background: #ffebee;
    color: #c62828;
    border-left-color: #f44336;
}

.spts-alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-left-color: #ff9800;
}

.spts-alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left-color: #2196f3;
}

/* ПРОГРЕСС-БАР */
.spts-progress {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.spts-progress-bar {
    height: 100%;
    background: #667eea;
    transition: width 0.3s ease;
}

/* МОДАЛЬНЫЕ ОКНА */
.spts-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spts-modal.show {
    display: flex;
}

.spts-modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.spts-modal-header {
    margin-bottom: 20px;
}

.spts-modal-header h3 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
}

.spts-modal-footer {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* СТАРЫЙ РЕЖИМ - СТИЛИ ДЛЯ IE */
.old-browser .spts-cards-grid {
    display: block;
}

.old-browser .spts-card {
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.old-browser .spts-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.old-browser .spts-form-row {
    display: block;
}

.old-browser .spts-form-col {
    margin-bottom: 15px;
}

.old-browser .spts-links {
    display: block;
}

.old-browser .spts-btn {
    display: block;
    margin-bottom: 10px;
    width: 100%;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {
    .spts-header {
        padding: 20px;
    }
    
    .spts-header h1 {
        font-size: 1.6em;
    }
    
    .spts-header p {
        font-size: 1em;
    }
    
    .spts-container {
        padding: 10px;
    }
    
    .spts-form {
        padding: 20px;
    }
    
    .spts-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .spts-old-browser-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
}

/* ПЕЧАТЬ */
@media print {
    .spts-old-browser-btn,
    .spts-btn,
    .spts-links,
    .spts-form {
        display: none !important;
    }
    
    .spts-container {
        padding: 0;
    }
    
    .spts-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}