:root {
    --bg-color: #1a1a1a;
    --card-bg: #252525;
    --accent-color: #E5A93C;
    --accent-hover: #c99330;
    --text-color: #f0f0f0;
    --text-muted: #aaaaaa;
    --border-color: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) #111;
}

/* РљР°СЃС‚РѕРјРЅС‹Р№ СЃРєСЂРѕР»Р»Р±Р°СЂ (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #111; 
}
::-webkit-scrollbar-thumb {
    background: var(--border-color); 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color); 
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header & Logo */
.header {
    background-color: #111111;
    padding: 25px 40px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-logo {
    max-height: 70px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.logo-top, .logo-bot {
    color: white;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 1.5px;
}

.logo-mid {
    color: var(--accent-color);
    font-weight: 800;
    font-size: 28px;
    text-shadow: 0 0 15px rgba(229, 169, 60, 0.4);
    letter-spacing: 0.5px;
}

/* Main Container */
.main-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Accordion Styles (details/summary) */
details {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

summary {
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    background-color: #2a2a2a;
    color: var(--accent-color);
    list-style: none; /* Hide default arrow in some browsers */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
    user-select: none;
}

summary::-webkit-details-marker {
    display: none; /* Hide default arrow in webkit */
}

summary:hover {
    background-color: #333;
}

summary::after {
    content: '+';
    font-size: 24px;
    line-height: 1;
    color: var(--accent-color);
    transition: transform 0.3s;
}

details[open] summary::after {
    content: '-';
    transform: rotate(180deg);
}

details[open] summary {
    border-bottom: 1px solid var(--border-color);
}

.details-content {
    padding: 20px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 600;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex: 1; 
    text-align: center;
}

.tab-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: var(--bg-color);
    background: var(--accent-color);
    box-shadow: 0 4px 15px rgba(229, 169, 60, 0.2);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 35px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
}

/* Script Content Styles */
.script-card h2 {
    color: var(--accent-color);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 22px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}
.script-card h2:first-child {
    margin-top: 0;
}
.script-card p, .script-card ul {
    margin-bottom: 15px;
    color: #e0e0e0;
    font-size: 16px;
}
.script-card ul {
    padding-left: 25px;
}
.script-card li {
    margin-bottom: 8px;
}
.script-card b {
    color: white;
}
.script-card i {
    color: var(--text-muted);
    font-style: italic;
}

/* Database Tab */
.db-controls {
    margin-bottom: 25px;
    position: sticky;
    top: 105px; /* header is sticky */
    z-index: 90;
}

.search-input {
    width: 100%;
    padding: 18px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2), 0 4px 10px rgba(0,0,0,0.3);
}

.search-input::placeholder {
    font-size: 15px;
    transition: font-size 0.3s ease;
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2), 0 0 8px rgba(229, 169, 60, 0.3);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.company-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-color: #444;
}

.company-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
}

.company-name {
    font-weight: 800;
    font-size: 20px;
    color: white;
    line-height: 1.3;
}

.company-status {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(229, 169, 60, 0.15);
    color: var(--accent-color);
    border: 1px solid rgba(229, 169, 60, 0.3);
    white-space: nowrap;
}

.company-meta {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.meta-item {
    color: #ddd;
    line-height: 1.4;
}

.meta-label {
    color: var(--accent-color);
    font-weight: 600;
    margin-right: 5px;
}

.company-comment {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 25px;
    flex-grow: 1;
    background: rgba(0,0,0,0.15);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--border-color);
}

.call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    background: var(--accent-color);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.call-btn:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 0.4s ease-out;
}

@keyframes ripple {
    from { width: 0; height: 0; opacity: 1; }
    to { width: 300px; height: 300px; opacity: 0; }
}

.call-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 15px rgba(229, 169, 60, 0.3);
}

.call-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
}


/* ========================================= */
/* MEDIA QUERIES (РђРґР°РїС‚РёРІРЅРѕСЃС‚СЊ)              */
/* ========================================= */

/* РџР»Р°РЅС€РµС‚С‹ (РґРѕ 992px) */
@media (max-width: 992px) {
    .main-container {
        margin: 20px auto;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* РњРѕР±РёР»СЊРЅС‹Рµ С‚РµР»РµС„РѕРЅС‹ (РґРѕ 768px) */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }

    .main-logo {
        max-height: 50px;
    }

    .logo-mid {
        font-size: 22px;
    }

    .logo-top, .logo-bot {
        font-size: 12px;
    }

    .tabs {
        flex-direction: column;
        gap: 10px;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

    .tab-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        border: 1px solid var(--border-color);
    }
    
    .tab-btn.active {
        border-color: var(--accent-color);
    }

    .card {
        padding: 20px;
    }

    .script-card h2 {
        font-size: 18px;
    }
    
    .script-card p, .script-card ul {
        font-size: 15px;
    }

    .search-input {
        padding: 15px;
        font-size: 15px;
    }

    .search-input::placeholder {
        font-size: 13px;
    }

    .db-controls {
        top: 80px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .company-card {
        padding: 20px;
    }

    .company-header {
        align-items: flex-start;
    }

    .company-name {
        font-size: 18px;
    }

    .call-btn {
        padding: 15px;
        font-size: 18px;
    }
}

/* РњРµР»РєРёРµ С‚РµР»РµС„РѕРЅС‹ (РґРѕ 480px) */
@media (max-width: 480px) {
    .header {
        padding: 10px 15px;
    }
    
    .main-logo {
        max-height: 40px;
    }
    
    .logo-mid {
        font-size: 18px;
    }
    
    .main-container {
        padding: 0 15px;
    }

    .search-input::placeholder {
        font-size: 11px;
    }
}

/* ========================================= */
/* QUIZ STYLES                               */
/* ========================================= */

#quiz-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
}

.quiz-header {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--accent-color);
    text-align: center;
}

.quiz-question {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    color: var(--text-color);
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    transition: all 0.2s;
}

.quiz-option:hover {
    background-color: #333;
    border-color: #555;
}

.quiz-option.selected {
    border-color: var(--accent-color);
    background-color: rgba(229, 169, 60, 0.1);
}

.quiz-option.correct {
    border-color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.quiz-option.wrong {
    border-color: #F44336;
    background-color: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.quiz-btn {
    margin-top: 25px;
    background-color: var(--accent-color);
    color: #1a1a1a;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s;
    display: none;
    width: 100%;
    font-size: 16px;
}

.quiz-btn:hover {
    background-color: var(--accent-hover);
}

.quiz-btn.visible {
    display: block;
}

.quiz-result {
    text-align: center;
}

.quiz-score {
    font-size: 48px;
    font-weight: 800;
    color: var(--accent-color);
    margin: 20px 0;
}

.quiz-msg {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.modal-header h2 {
    color: var(--accent-color);
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: white;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 14px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.btn-primary {
    background: var(--accent-color);
    color: #1a1a1a;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.edit-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-btn:hover {
    background: var(--accent-color);
    color: #111;
}

.company-card {
    position: relative;
}

.add-company-btn {
    background: rgba(229, 169, 60, 0.1);
    color: var(--accent-color);
    border: 1px dashed var(--accent-color);
    padding: 18px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
}

.add-company-btn:hover {
    background: var(--accent-color);
    color: #111;
}

.db-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.db-header-controls .search-input {
    margin-bottom: 0;
    flex: 1;
}

@media (max-width: 829px) {
    .db-header-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .add-company-btn {
        width: 100%;
    }
}
 
 / *   L o c k e d   T a b   S t y l e s   * /  
 . l o c k e d - t a b   s u m m a r y   {   p o s i t i o n :   r e l a t i v e ;   c u r s o r :   n o t - a l l o w e d ;   }  
 . l o c k e d - t a b   s u m m a r y : h o v e r : : a f t e r   {  
         c o n t e n t :   ' ' ;   p o s i t i o n :   a b s o l u t e ;   r i g h t :   1 5 p x ;   t o p :   5 0 % ;   t r a n s f o r m :   t r a n s l a t e Y ( - 5 0 % ) ;  
         w i d t h :   2 4 p x ;   h e i g h t :   2 4 p x ;  
         b a c k g r o u n d - i m a g e :   u r l ( ' d a t a : i m a g e / s v g + x m l ; u t f 8 , < s v g   w i d t h = \  
 2 4 \   h e i g h t = \ 2 4 \   v i e w B o x = \ 0  
 0  
 2 4  
 2 4 \   f i l l = \ n o n e \   s t r o k e = \ % 2 3 E 5 A 9 3 C \   s t r o k e - w i d t h = \ 2 \   s t r o k e - l i n e c a p = \ r o u n d \   s t r o k e - l i n e j o i n = \ r o u n d \ > < r e c t   x = \ 3 \   y = \ 1 1 \   w i d t h = \ 1 8 \   h e i g h t = \ 1 1 \   r x = \ 2 \   r y = \ 2 \ > < / r e c t > < p a t h   d = \ M 7  
 1 1 V 7 a 5  
 5  
 0  
 0  
 1  
 1 0  
 0 v 4 \ > < / p a t h > < / s v g > ' ) ;  
         b a c k g r o u n d - s i z e :   c o n t a i n ;   b a c k g r o u n d - r e p e a t :   n o - r e p e a t ;   a n i m a t i o n :   f a d e I n   0 . 3 s   e a s e ;  
 }  
 /* ========================================= */
/* CUSTOM MODALS & SELECTS                   */
/* ========================================= */

.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: all 0.3s ease;
    text-align: center;
}

.custom-modal-overlay.active .custom-modal {
    transform: translateY(0);
}

.custom-modal-content p {
    font-size: 16px;
    margin-bottom: 25px;
    color: var(--text-color);
}

.custom-modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.custom-modal-actions button {
    min-width: 100px;
}

.btn-cancel {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    color: white;
    border-color: #555;
    background: rgba(255,255,255,0.05);
}

/* Custom Select */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-selected {
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.custom-select-selected::after {
    content: 'Ў';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--accent-color);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 5px;
    z-index: 99;
    display: none;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.custom-select-options.active {
    display: block;
}

.custom-select-options div {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    color: white;
    font-size: 14px;
}

.custom-select-options div:last-child {
    border-bottom: none;
}

.custom-select-options div:hover {
    background: rgba(229, 169, 60, 0.1);
    color: var(--accent-color);
}
/* ========================================= */
/* CUSTOM MODALS & SELECTS                   */
/* ========================================= */

.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: all 0.3s ease;
    text-align: center;
}

.custom-modal-overlay.active .custom-modal {
    transform: translateY(0);
}

.custom-modal-content p {
    font-size: 16px;
    margin-bottom: 25px;
    color: var(--text-color);
}

.custom-modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.custom-modal-actions button {
    min-width: 100px;
}

.btn-cancel {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    color: white;
    border-color: #555;
    background: rgba(255,255,255,0.05);
}

/* Custom Select */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-selected {
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.custom-select-selected::after {
    content: 'Ў';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--accent-color);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 5px;
    z-index: 99;
    display: none;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    text-align: left;
}

.custom-select-options.active {
    display: block;
}

.custom-select-options div {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    color: white;
    font-size: 14px;
}

.custom-select-options div:last-child {
    border-bottom: none;
}

.custom-select-options div:hover {
    background: rgba(229, 169, 60, 0.1);
    color: var(--accent-color);
}
