/* Procurement Portal Styles - Tochka Bank inspired design */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #e5e5e5;
    color: #1D1D1F;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.portal-header {
    background-color: #FFFFFF;
    border-bottom: 1px solid #E5E5E7;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.portal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1D1D1F;
    margin: 0;
    line-height: 1.2;
}

.portal-subtitle {
    font-size: 13px;
    color: #86868B;
    margin: 0;
    line-height: 1.2;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.header-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1D1D1F;
    font-size: 16px;
    transition: background-color 0.2s;
}

.header-btn:hover {
    background-color: #F5F5F7;
}

.header-btn .icon {
    font-size: 18px;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    padding-left: 16px;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(280px, 280px) minmax(0, 1fr);
    grid-auto-columns: 280px 1fr;
    gap: 20px;
    background-color: transparent;
    width: 100%;
    box-sizing: border-box;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-left: -8px;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
    position: sticky;
    top: 100px;
    align-self: start;
    height: fit-content;
    z-index: 10;
}

.sidebar-card {
    background-color: #FFFFFF;
    border: 1px solid #E5E5E7;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    width: 100% !important;
    min-width: 240px !important;
    max-width: 280px !important;
    box-sizing: border-box;
    overflow: hidden;
    flex-shrink: 0;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.card-icon {
    font-size: 18px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1D1D1F;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.filter-item {
    margin-bottom: 12px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.filter-item:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-size: 13px;
    color: #1D1D1F;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.filter-select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 10px 14px;
    padding-right: 40px;
    border: 1px solid #D2D2D7;
    border-radius: 10px;
    background-color: #FFFFFF;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2386868B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    font-size: 15px;
    font-weight: 400;
    color: #1D1D1F;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
    table-layout: fixed;
}

.filter-select:hover {
    border-color: #007AFF;
    background-color: #F5F5F7;
    box-shadow: 0 2px 4px rgba(0, 122, 255, 0.1);
}

.filter-select:focus {
    outline: none;
    border-color: #007AFF;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.filter-select:active {
    transform: scale(0.98);
}

/* Content Area */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: transparent;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    flex: 1;
    box-sizing: border-box;
    overflow: hidden;
}

/* Search Bar */
.search-bar-container {
    margin-bottom: 8px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D2D2D7;
    border-radius: 10px;
    font-size: 15px;
    color: #1D1D1F;
    background-color: #FFFFFF;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #007AFF;
}

.search-input::placeholder {
    color: #86868B;
}

/* Requests Section */
.requests-section {
    background-color: transparent;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

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

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: #1D1D1F;
    margin: 0;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.requests-count {
    font-size: 14px;
    color: #86868B;
}

/* Requests Grid */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    align-items: stretch;
}

.request-card {
    background-color: #FFFFFF;
    border: 1px solid #E5E5E7;
    border-radius: 12px;
    padding: 20px 20px 30px 20px;
    transition: box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    height: 100%;
    box-sizing: border-box;
}

.request-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: #D2D2D7;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #F5F5F7;
}

.request-number {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.number-label {
    font-size: 15px;
    font-weight: 600;
    color: #1D1D1F;
}

.request-date {
    font-size: 13px;
    color: #86868B;
}

.request-status {
    display: flex;
    align-items: center;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.status-badge.closed {
    background-color: #F5F5F7;
    color: #86868B;
}

.request-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0;
    justify-content: flex-start;
}

.request-title {
    font-size: 17px;
    font-weight: 600;
    color: #1D1D1F;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.request-description {
    font-size: 15px;
    color: #424245;
    line-height: 1.5;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.request-documents {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.documents-label {
    font-size: 13px;
    color: #86868B;
    font-weight: 500;
}

.document-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #007AFF;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s;
}

.document-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.doc-icon {
    font-size: 16px;
}

.request-footer {
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.response-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #007AFF;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.response-btn:hover:not(.disabled) {
    background-color: #0056CC;
}

.response-btn.disabled {
    background-color: #D2D2D7;
    color: #86868B;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.btn-icon {
    font-size: 16px;
}

/* Empty State */
.no-applications {
    text-align: center;
    padding: 60px 20px;
    color: #86868B;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 16px;
}

/* Alerts */
.alert {
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid;
}

.alert-success {
    background-color: #E8F5E9;
    color: #2E7D32;
    border-color: #C8E6C9;
}

.alert-error {
    background-color: #FFEBEE;
    color: #C62828;
    border-color: #FFCDD2;
}

/* Footer */
.portal-footer {
    background-color: #F5F5F7;
    border-top: 1px solid #E5E5E7;
    padding: 20px 24px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-text {
    font-size: 13px;
    color: #86868B;
    margin: 0;
}

.footer-link {
    color: #007AFF;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr !important;
        grid-auto-columns: 1fr !important;
    }
    
    .sidebar {
        order: 2;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        position: relative !important;
        top: 0 !important;
    }
    
    .content-area {
        order: 1;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 12px 16px;
    }
    
    .portal-title {
        font-size: 16px;
    }
    
    .portal-subtitle {
        font-size: 12px;
    }
    
    .main-container {
        padding: 16px;
    }
    
    .sidebar {
        display: flex !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-bottom: 24px !important;
        position: relative !important;
        top: 0 !important;
        order: 1 !important;
    }
    
    .sidebar-card {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
    
    .content-area {
        order: 2 !important;
    }
    
    .request-card {
        padding: 16px;
    }
    
    .applications-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 32px;
    }
    
    .header-actions {
        gap: 4px;
    }
    
    .header-btn {
        padding: 6px 8px;
    }
}

