/* Общие сбросы и базовые стили */

:root {
    --primary: #141416;
    --primary-block: #F9F9F9;
    /* цвет блоков*/
    --primary-link: #718096;
    /* ссылки основной */
    --secondary: #64748b;
    /* Второстепенный (иконки, подписи) */
    --accent: #f97316;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Manrope", sans-serif;
    background: rgba(250, 250, 250, 1);
    color: var(--primary-text);
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: calc(100vh - 140px);
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.main-content {
    flex: 1;
    padding-left: 20px;
}

/* Шапка и сайдбар потом, пока упрощённо */

/* Карточки (как на многих бухгалтерских сервисах) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 30px 0;
    padding: 16px;
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 1);
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    /* box-shadow: 15.84px 15.84px 55.09px 0px rgba(0, 0, 0, 0.12); */
    transition: transform 0.2s;
}

.stat-card.primary {
    background-color: #2195f33b;
}

.stat-card.accent {
    background-color: #27ae5f52;
}

.stat-card.danger {
    background-color: rgba(255, 0, 0, 0.272);
}

.stat-card.warning {
    background-color: #f39d1245;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-value {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    color: #666;
    font-size: 1.1rem;
}

.primary {
    border-left: 5px solid #3498db;
}

.accent {
    border-left: 5px solid #2ecc71;
}

.danger {
    border-left: 5px solid #e74c3c;
}

.warning {
    border-left: 5px solid #f39c12;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.section {
    margin: 40px 0;
    background-color: #fff;
    padding: 16px;
    border-radius: 16px;
}


.section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    background: white;
    border-radius: 10px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    border: #33333335 1px solid;
}

.task-item.overdue {
    border-left: 5px solid #e74c3c;
    background: #fff5f5;
}

.task-info h3 {
    margin: 0 0 6px;
    font-size: 1.15rem;
}

.task-info .client {
    color: #3498db;
    font-weight: 500;
}

.task-info .deadline {
    color: #777;
    font-size: 0.95rem;
}

.quick-actions .actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.action-btn {
    display: block;
    background: #fff;
    color: rgba(20, 20, 22, 1);
    text-align: center;
    padding: 16px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    border: 1px solid #33333388;
    box-shadow: 18.08px 12.06px 61.77px 0px rgba(97, 97, 97, 0.25);

}

.action-btn:hover {
    background: rgba(20, 20, 22, 1);
    color: #fff;
}


/* Sidebar */
.sidebar {
    font-size: 56px;
    width: 240px;
    background: var(--primary-block);
    color: white;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px;
    text-align: center;
}

.border-line {
    background-color: var(--primary-link);
    height: 1px;
    width: 50%;
    align-self: center;
}

.logo {
    font-size: 1.8rem;
    margin-bottom: 4px;
    color: #3498db;
}

.subtitle {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    color: var(--accent);
    margin: 4px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: var(--primary-link);
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background: rgba(38, 38, 38, 1);
    border-radius: 6px;
    color: white;
}

.sidebar-nav a.active {
    background: #3498db;
    color: white;
    font-weight: 500;
}

.icon {
    margin-right: 12px;
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}

.sidebar-link:hover path {
    stroke: #fff;
    transition: all 0.1s;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #34495e;
    font-size: 0.95rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    color: #e74c3c;
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.logout-btn:hover {
    color: #c0392b;
}

.user-info {
    opacity: 0.7;
    font-size: 0.9rem;
    text-align: center;
}

/* Адаптация main при наличии sidebar */
.main-with-sidebar {
    flex: 1;
    padding: 0 30px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-left: 20px;
}

.main-full {
    flex: 1;
    padding: 0 30px;
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.clients-table th,
.clients-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.clients-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

/* Сообщения */
.messages {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.messages li {
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 6px;
}

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

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

/* Кнопки danger и secondary */
.btn.danger {
    background: #e74c3c;
}

.btn.danger:hover {
    background: #c0392b;
}

.btn.secondary {
    background: #95a5a6;
    margin-left: 10px;
}

.btn.secondary:hover {
    background: #7f8c8d;
}

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

.tasks-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.tasks-table th,
.tasks-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tasks-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.task-desc-preview {
    font-size: 0.9rem;
    color: #666;
    margin-top: 4px;
}

.overdue {
    background: #fff5f5;
}

.completed {
    background: #f6fff6;
    opacity: 0.85;
}

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

.status.completed {
    background: #d4edda;
    color: #155724;
}

.status.overdue {
    background: #f8d7da;
    color: #721c24;
}

.status.active {
    background: #fff3cd;
    color: #856404;
}

.red.bold {
    color: #c0392b;
    font-weight: 600;
}

.actions {
    white-space: nowrap;
}

.action-link {
    margin-right: 12px;
    font-size: 0.9rem;
    text-decoration: none;
}

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

.action-link.danger {
    color: #e74c3c;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 30px;
}

.empty-state p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}




.checkbox-cell {
    text-align: center;
    width: 60px;
}

.checkbox-label {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    display: inline-block;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border: 2px solid #ccc;
    border-radius: 4px;
    transition: all 0.2s;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked~.checkmark {
    background-color: #27ae60;
    border-color: #27ae60;
}

.checkbox-label input:checked~.checkmark:after {
    display: block;
}

#calendar {
    max-width: 1200px;
    margin: 30px auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}



.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.settings-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.settings-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.profile-info p {
    margin: 12px 0;
    font-size: 1.05rem;
}

.profile-info strong {
    color: #555;
}

.connection-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.connection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.service {
    font-weight: 500;
}

.status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.status.success {
    background: #d4edda;
    color: #155724;
}

.status {
    background: #fff3cd;
    color: #856404;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 12px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

