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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #FFFFFF;
    min-height: 100vh;
    color: #000000;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Messages */
.messages {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    max-width: 420px;
    width: calc(100% - 48px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.notification {
    pointer-events: all;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transform: translateX(calc(100% + 100px));
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.notification::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    animation: slideProgress 5s linear;
}

@keyframes slideProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(calc(100% + 100px));
    opacity: 0;
}

.alert-message {
    flex: 1;
    font-weight: 500;
    line-height: 1.6;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.alert-close {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    font-size: 20px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
    font-weight: bold;
}

.alert-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.15) rotate(90deg);
}

.alert-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-left: 5px solid rgba(255, 255, 255, 0.8);
}

.alert-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-left: 5px solid rgba(255, 255, 255, 0.8);
}

.alert-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-left: 5px solid rgba(255, 255, 255, 0.8);
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
}

.auth-card h1 {
    margin-bottom: 30px;
    text-align: center;
    color: #1f2937;
    font-size: 28px;
}

.invite-info {
    background: #eff6ff;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    color: #1e40af;
}

.invite-info strong {
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.required {
    color: #ef4444;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #7A75FF;
    box-shadow: 0 0 0 3px rgba(122, 117, 255, 0.1);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6b7280;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #7A75FF;
    color: #FFFFFF;
    box-shadow: 0 4px 6px rgba(122, 117, 255, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(122, 117, 255, 0.4);
    background: #6B66E6;
}

/* Кнопки в формах занимают всю ширину, кроме маленьких */
.btn-primary:not(.btn-small):not([style*="width"]) {
    width: 100%;
}

/* Маленькие кнопки всегда auto */
.btn-small {
    width: auto !important;
    flex-shrink: 0;
}

.btn-secondary {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #374151;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Стили для кнопок в шапке уже определены выше */

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

/* Переопределение для кнопок в шапке */
.dashboard-header .btn-small {
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
    color: #6b7280;
}

.auth-footer a {
    color: #7A75FF;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Removed User Page */
.removed-card {
    text-align: center;
}

.removed-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.removed-message {
    color: #6b7280;
    margin-bottom: 30px;
    line-height: 1.6;
}

.invite-hint {
    font-size: 14px;
    color: #9ca3af;
    margin-top: 15px;
    text-align: center;
}

.removed-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.removed-actions .btn {
    width: 100%;
}

/* Страница ожидания подтверждения */
.pending-card {
    text-align: center;
    max-width: 600px;
}

.pending-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.pending-message {
    color: #6b7280;
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 16px;
}

.pending-organizations {
    margin: 30px 0;
    text-align: left;
}

.pending-organizations h3 {
    color: #1f2937;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

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

.pending-org-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-radius: 12px;
    border: 2px solid #f59e0b;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.1);
}

.org-icon {
    font-size: 32px;
}

.org-info {
    flex: 1;
}

.org-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 4px;
}

.org-status {
    color: #92400e;
    font-size: 14px;
    font-weight: 500;
}

.pending-hint {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 30px 0;
    text-align: left;
}

.pending-hint p {
    color: #1e40af;
    font-size: 14px;
    margin: 8px 0;
    line-height: 1.5;
}

.pending-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

.pending-actions .btn {
    width: 100%;
}

/* Dashboard */
.dashboard-header {
    background: #7A75FF;
    padding: 12px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    gap: 24px;
    flex-wrap: wrap;
    border-radius: 0 0 16px 16px;
    margin: 0 16px;
    max-width: calc(100% - 32px);
    min-height: 70px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin-top: 0;
    justify-content: flex-end;
}

/* Кнопки в шапке */
.dashboard-header .btn-primary,
.dashboard-header .header-actions .btn-primary,
.dashboard-header .btn-small {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    text-align: center !important;
    border: 2px solid rgba(122, 117, 255, 0.3) !important;
    padding: 10px 16px !important;
}

.dashboard-header .btn-primary:hover,
.dashboard-header .header-actions .btn-primary:hover,
.dashboard-header .btn-small:hover {
    background: #f5f9ff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    border-color: rgba(122, 117, 255, 0.5) !important;
}

/* Кнопка "Выйти" */
.dashboard-header .btn-logout,
.dashboard-header a.btn-logout,
.dashboard-header .header-actions .btn-logout,
.dashboard-header .header-actions a.btn-logout {
    background: #a70b0b !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(167, 11, 11, 0.3) !important;
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    text-align: center !important;
    border: 2px solid rgba(167, 11, 11, 0.4) !important;
    padding: 10px 16px !important;
    text-decoration: none !important;
}

.dashboard-header .btn-logout:hover,
.dashboard-header a.btn-logout:hover,
.dashboard-header .header-actions .btn-logout:hover,
.dashboard-header .header-actions a.btn-logout:hover {
    background: #8a0909 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(167, 11, 11, 0.4) !important;
    border-color: rgba(167, 11, 11, 0.6) !important;
    text-decoration: none !important;
}

/* Стили для логотипа и хедера */
.header-logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 250px;
    justify-content: flex-start;
}

.logo-icon {
    font-size: 28px;
    filter: hue-rotate(90deg) saturate(1.2);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    justify-content: center;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.user-info-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    margin-top: 2px;
}

.user-name-header {
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    opacity: 0.95;
}

.user-role-header {
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Стили для .logo-text уже определены выше в .header-title-section */

.header-content-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Старые стили user-info удалены, так как блок больше не используется */

.telegram-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white !important;
    border-radius: 8px;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-small {
    padding: 8px 16px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: auto !important;
}

/* Кнопки в шапке - черные и жирные */
.dashboard-header .btn-small {
    font-weight: 700 !important;
    color: #000000 !important;
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.organizations-section {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    width: 100%;
}

.organizations-section h2 {
    color: #000000;
    margin-bottom: 30px;
    font-size: 28px;
}

.organizations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.org-card {
    background: #f5f9ff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border: 1px solid #e5e7eb;
}

.org-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(122, 117, 255, 0.2);
    border-color: #7A75FF;
}

.org-card h3 {
    color: #1f2937;
    margin-bottom: 12px;
    font-size: 20px;
}

.org-role {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge-admin {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 6px 14px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.badge-member {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    padding: 6px 14px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.badge-leader {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #9f1239;
    padding: 6px 14px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(219, 39, 119, 0.2);
}

.badge-project-manager {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    padding: 6px 14px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.badge-pending {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    color: #9a3412;
    padding: 6px 14px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(251, 146, 60, 0.2);
}

.org-meta {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 16px;
}

.invite-link-section {
    margin: 16px 0;
    padding: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 10px;
    border-left: 3px solid #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.invite-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.invite-link-container {
    display: flex;
    gap: 8px;
}

.invite-link-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    background: white;
    font-family: monospace;
}

.copy-btn {
    white-space: nowrap;
    padding: 8px 12px;
}

.copy-btn:hover {
    background: #7A75FF;
    color: white;
}

.org-actions {
    margin-top: 16px;
}

.empty-state {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    color: #6b7280;
    font-size: 18px;
    border: 2px dashed #d1d5db;
}

/* Модальное окно сотрудников */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-container {
    background: white;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    border: 1px solid #e5e7eb;
}

.modal-header {
    background: #7A75FF;
    color: #FFFFFF;
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #FFFFFF;
    font-weight: 600;
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #FFFFFF;
    font-size: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    line-height: 1;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-content {
    padding: 30px;
    background: #FFFFFF;
    overflow-y: auto;
    flex: 1;
}

.invite-section {
    margin-bottom: 30px;
    padding: 24px;
    background: #f5f9ff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(122, 117, 255, 0.1);
}

.invite-section h3 {
    margin: 0 0 16px 0;
    color: #000000;
    font-size: 20px;
    font-weight: 600;
}

.invite-link-container-large {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.invite-link-container-large .invite-link-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    font-family: monospace;
}

.invite-link-container-large .copy-btn {
    white-space: nowrap;
    padding: 12px 24px;
}

.invite-hint {
    color: #64748b;
    font-size: 14px;
    margin: 12px 0 0 0;
    font-weight: 400;
}

.employees-list-section {
    padding: 24px;
    background: #f5f9ff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(122, 117, 255, 0.1);
}

.employees-list-section h3 {
    margin: 0 0 20px 0;
    color: #000000;
    font-size: 20px;
    font-weight: 600;
}

.employees-list {
    min-height: 100px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.error {
    text-align: center;
    padding: 20px;
    color: #ef4444;
    background: #fee2e2;
    border-radius: 8px;
}

.employees-table {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.employee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: #FFFFFF;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.employee-item:hover {
    background: #FFFFFF;
    border-color: #7A75FF;
    box-shadow: 0 4px 6px rgba(122, 117, 255, 0.15);
    transform: translateY(-2px);
}

.employee-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 1;
}

.employee-info > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.employee-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 4px;
}

.employee-email {
    color: #6b7280;
    font-size: 14px;
    font-weight: 400;
}

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

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

.current-user-label {
    color: #059669;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    background: #d1fae5;
    border-radius: 6px;
    border: 1px solid #10b981;
}

/* Секция ожидающих приглашений */
.pending-section {
    margin-bottom: 30px;
    padding: 24px;
    background: #f5f9ff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(122, 117, 255, 0.1);
}

.pending-section h3 {
    margin: 0 0 20px 0;
    color: #000000;
    font-size: 20px;
    font-weight: 600;
}

.pending-list {
    min-height: 60px;
}

.pending-table {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: #FFFFFF;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pending-item:hover {
    border-color: #7A75FF;
    box-shadow: 0 4px 6px rgba(122, 117, 255, 0.15);
    transform: translateY(-2px);
}

.pending-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 1;
}

.pending-info > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pending-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 4px;
}

.pending-email {
    color: #6b7280;
    font-size: 14px;
    font-weight: 400;
}

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

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

/* Управление ролями */
.employee-role-controls {
    display: flex;
    align-items: center;
}

.role-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #1f2937;
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 180px;
}

.role-select:hover:not(:disabled) {
    border-color: #7A75FF;
}

.role-select:focus {
    outline: none;
    border-color: #7A75FF;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.role-select:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Улучшенные стили для кнопок */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.98);
}

/* Улучшенные инпуты */
input[type="text"],
input[type="email"],
input[type="password"] {
    transition: all 0.3s ease;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover {
    border-color: #9ca3af;
}

/* Анимации для карточек */
.org-card,
.employee-item,
.pending-item {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Улучшенный loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #6b7280;
}

.loading::before {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top-color: #7A75FF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Приветственная секция */
.welcome-section {
    padding: 40px 30px;
    max-width: 900px;
    margin: 40px auto;
    width: 100%;
}

.welcome-card {
    background: #f5f9ff;
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(122, 117, 255, 0.15);
    text-align: center;
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 24px;
    display: block;
}

.welcome-title {
    color: #000000;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.welcome-message {
    color: #374151;
    font-size: 18px;
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.welcome-instructions {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 32px;
    margin: 32px 0;
    text-align: left;
    border: 1px solid rgba(122, 117, 255, 0.1);
}

.instructions-title {
    color: #000000;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.instructions-list {
    color: #374151;
    font-size: 16px;
    line-height: 1.8;
    margin: 0;
    padding-left: 24px;
}

.instructions-list li {
    margin-bottom: 12px;
}

.instructions-list ul {
    margin-top: 8px;
    margin-bottom: 12px;
    padding-left: 24px;
    list-style-type: disc;
}

.instructions-list strong {
    color: #7A75FF;
    font-weight: 600;
}

.welcome-action-btn {
    margin-top: 24px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    min-width: 220px;
}

.welcome-hint {
    color: #6b7280;
    font-size: 15px;
    margin-top: 24px;
    font-style: italic;
}

.role-capabilities {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    border: 1px solid rgba(122, 117, 255, 0.15);
    text-align: left;
}

.role-title {
    color: #7A75FF;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.capabilities-list {
    color: #374151;
    font-size: 15px;
    line-height: 1.8;
    margin: 0 0 16px 0;
    padding-left: 24px;
    list-style-type: disc;
}

.capabilities-list li {
    margin-bottom: 8px;
}

.role-action {
    color: #000000;
    font-size: 15px;
    font-weight: 600;
    margin: 16px 0 0 0;
    padding: 12px 16px;
    background: #f5f9ff;
    border-radius: 8px;
    border-left: 4px solid #7A75FF;
}

.welcome-instructions-additional {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid rgba(122, 117, 255, 0.1);
}

/* Секция проектов */
.projects-section {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto 40px auto;
    width: 100%;
}

.projects-section h2 {
    color: #000000;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    align-items: start; /* Карточки выравниваются по верхнему краю, не растягиваются */
}

.project-card {
    background: #f5f9ff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(122, 117, 255, 0.15);
    border-color: #7A75FF;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.project-name-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    margin-right: 10px;
}

.responsible-field-wrapper {
    position: relative;
}

.btn-select-responsible {
    transition: all 0.2s ease;
}

.btn-select-responsible:hover {
    border-color: #7A75FF;
    background-color: #eef2ff;
    color: #7A75FF;
}

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

.responsible-option {
    transition: all 0.15s ease;
}

.responsible-option:hover {
    background-color: #f7fafc !important;
}

.responsible-option:last-child {
    border-bottom: none;
}

.responsible-dropdown::-webkit-scrollbar {
    width: 6px;
}

.responsible-dropdown::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 3px;
}

.responsible-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.responsible-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.project-name {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.3;
    margin: 0;
}

.btn-edit-project {
    background: #e0f2fe;
    border: none;
    color: #0369a1;
    font-size: 18px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.btn-edit-project:hover {
    background: #bae6fd;
    transform: scale(1.05);
}

.btn-delete-project {
    background: #fee2e2;
    border: none;
    color: #dc2626;
    font-size: 24px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
    font-weight: bold;
}

.btn-delete-project:hover {
    background: #fecaca;
    transform: scale(1.1);
}

.project-org {
    color: #718096;
    font-size: 13px;
    margin-bottom: 15px;
}

.project-stats {
    min-height: 100px;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    align-items: center;
}

/* Блок настройки уведомлений */
.project-notifications-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.notifications-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.notifications-toggle:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.notifications-toggle-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notifications-toggle-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #6b7280;
}

.notifications-settings {
    margin-top: 12px;
    padding: 16px;
    background: #fafbfc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notifications-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notification-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notification-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-field input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    color: #111827;
}

.notification-field input:focus {
    outline: none;
    border-color: #7A75FF;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.notification-field input::placeholder {
    color: #9ca3af;
}

.notification-field .field-hint {
    font-size: 11px;
    color: #6b7280;
    margin-top: -2px;
}

.notifications-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.notifications-actions .btn {
    flex: 1;
}

.btn-project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: #f7fafc;
    color: #2d3748;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    line-height: 1.2;
    min-height: 28px;
}

.btn-project-link:hover {
    background: #7A75FF;
    color: white;
    border-color: #7A75FF;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.25);
}

.btn-manage-buttons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: #f9fafb;
    color: #64748b;
    text-decoration: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.2;
    min-height: 28px;
}

.btn-manage-buttons:hover {
    background: #e5e7eb;
    color: #2d3748;
    border-color: #d1d5db;
}

.custom-button-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.custom-button-item input {
    width: 100%;
}

/* Финансы */
.finance-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f7fafc;
}

.finance-label {
    color: #718096;
    font-size: 14px;
}

.finance-value {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

/* Статистика проекта */
.stats-container {
    margin: 15px 0;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.stats-container-header {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.stat-item {
    text-align: center;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.stat-label {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 13px;
    font-weight: 700;
}

/* Баланс */
.project-balance-section {
    margin-bottom: 15px;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f7fafc;
}

.balance-label {
    color: #718096;
    font-size: 14px;
}

.balance-value {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.balance-value.total {
    color: #48bb78;
    font-size: 16px;
}

/* Статистика за сегодня */
.project-today-stats {
    margin: 15px 0;
}

.today-stats-header {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

/* Форма добавления проекта */
.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #1f2937;
    transition: border-color 0.3s;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #7A75FF;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions .btn {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 20px;
    }
    
    .header-actions {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        gap: 12px;
        justify-content: center;
    }
    
    .header-actions .btn {
        width: auto;
        flex: 0 0 auto;
    }
    
    .user-info {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        padding: 10px 12px;
    }
    
    .user-info .btn {
        width: auto;
        flex: 0 0 auto;
        min-width: 120px;
    }
    
    .organizations-section {
        padding: 20px;
    }
    
    .organizations-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-container {
        width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .invite-link-container-large {
        flex-direction: column;
    }
    
    .invite-link-container-large .copy-btn {
        width: 100%;
    }
    
    .employee-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .employee-info {
        width: 100%;
    }
    
    .employee-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .pending-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .pending-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .messages {
        left: 20px;
        right: 20px;
        max-width: none;
        width: auto;
    }
    
    .notification {
        font-size: 13px;
        padding: 14px 18px;
    }
    
    .alert-message {
        font-size: 13px;
    }
    
    .telegram-modal {
        max-width: 95%;
        margin: 20px;
    }
    
    .telegram-code-value {
        font-size: 28px;
        letter-spacing: 4px;
    }
    
    .telegram-icon {
        font-size: 48px;
    }
    
    .telegram-success-icon {
        font-size: 64px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
.stats-grid {
    grid-template-columns: repeat(2, 1fr);
}
}

/* Telegram Modal Styles - применяются на всех устройствах */
.telegram-modal {
    max-width: 520px;
}

.telegram-modal-content {
    padding: 32px;
}

.telegram-modal-content > div {
    width: 100%;
}

.telegram-code-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

/* Визуальные разделители между секциями */
.telegram-code-header {
    text-align: center;
    width: 100%;
    padding-bottom: 32px;
    margin-bottom: 32px;
    border-bottom: 2px solid #d1d5db;
    position: relative;
}

.telegram-icon {
    font-size: 56px;
    margin-bottom: 12px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.9;
    }
}

.telegram-title {
    margin: 0 0 24px 0;
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
}

.telegram-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.telegram-code-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 28px 40px;
    border-radius: 16px;
    border: 3px solid #3b82f6;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2), 
                inset 0 2px 4px rgba(255, 255, 255, 0.5);
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.telegram-code-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.telegram-code-box:hover {
    border-color: #2563eb;
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.3), 
                inset 0 2px 4px rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.telegram-code-value {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 10px;
    color: #1e40af;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
    text-align: center;
    user-select: all;
    cursor: text;
    text-shadow: 0 2px 4px rgba(30, 64, 175, 0.15);
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.telegram-copy-btn {
    transition: all 0.2s ease;
    min-width: 180px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.telegram-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.telegram-instructions {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 24px 28px;
    border-radius: 12px;
    border-left: 5px solid #3b82f6;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    width: 100%;
    margin-top: 32px;
    margin-bottom: 32px;
}

.telegram-instructions::before {
    content: '💡';
    position: absolute;
    top: 24px;
    left: -12px;
    font-size: 24px;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #3b82f6;
}

.telegram-instructions-title {
    margin: 0 0 16px 0;
    color: #1e40af;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.telegram-instructions-list {
    margin: 0;
    padding-left: 24px;
    color: #1e3a8a;
    line-height: 1.85;
    list-style-position: outside;
    font-size: 14px;
}

.telegram-instructions-list li {
    margin-bottom: 12px;
    padding-left: 8px;
}

.telegram-instructions-list li:last-child {
    margin-bottom: 0;
}

.telegram-instructions-list code {
    background: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    border: 2px solid #93c5fd;
    box-shadow: 0 2px 4px rgba(147, 197, 253, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: inline-block;
    margin: 0 4px;
}

.telegram-status-box {
    padding: 20px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #fbbf24;
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 32px;
    margin-bottom: 32px;
}

.telegram-status-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
    background-size: 200% 100%;
    animation: statusProgress 2s linear infinite;
}

@keyframes statusProgress {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.telegram-status-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.telegram-status-icon {
    font-size: 24px;
    line-height: 1;
    display: inline-block;
    animation: statusPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.3));
}

@keyframes statusPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.telegram-status-text {
    color: #92400e;
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.telegram-actions {
    text-align: center;
    width: 100%;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #d1d5db;
}

.telegram-actions .btn {
    min-width: 180px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.telegram-success-section {
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.telegram-success-icon {
    font-size: 72px;
    line-height: 1;
    animation: successBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.telegram-success-title {
    color: #10b981;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.telegram-success-message {
    color: #6b7280;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

.telegram-success-btn {
    margin-top: 8px;
    min-width: 150px;
}

.telegram-loading-section {
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.telegram-loading-spinner {
    font-size: 56px;
    line-height: 1;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.telegram-loading-text {
    color: #6b7280;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* Секция для привязанного пользователя */
.telegram-linked-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 20px 0;
}

.telegram-status-success {
    text-align: center;
    width: 100%;
}

.telegram-status-icon-large {
    font-size: 72px;
    line-height: 1;
    margin-bottom: 16px;
    animation: successBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: block;
}

.telegram-status-title {
    color: #10b981;
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 600;
}

.telegram-status-message {
    color: #6b7280;
    margin: 0 0 24px 0;
    font-size: 15px;
    line-height: 1.6;
}

.telegram-bot-link {
    margin: 20px 0;
}

.telegram-bot-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #22E676;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(34, 230, 118, 0.3);
    border: none;
}

.telegram-bot-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 230, 118, 0.4);
    background: #1FD366;
}

.telegram-bot-link-inline {
    color: #36A2EB;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid #36A2EB;
    transition: all 0.2s ease;
}

.telegram-bot-link-inline:hover {
    color: #2B8CD6;
    border-bottom-color: #2B8CD6;
}
    
    .finance-row {
        flex-direction: column;
        gap: 4px;
    }
}

/* Анимация появления */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Фиксированная кнопка "Инструкции" в левом нижнем углу */
.instructions-fab {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #7A75FF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(122, 117, 255, 0.4);
    z-index: 1000;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.instructions-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(122, 117, 255, 0.6);
    background: #6b66e6;
}

.instructions-fab-icon {
    font-size: 28px;
    line-height: 1;
}

/* Адаптивность для кнопки инструкций */
@media (max-width: 768px) {
    .instructions-fab {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px;
    }

    .instructions-fab-icon {
        font-size: 24px;
    }
}
