/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Login page specific styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.login-header p {
    color: #7f8c8d;
    font-size: 16px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.login-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-button:hover {
    background: #2980b9;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    text-align: center;
    margin-top: 16px;
    min-height: 20px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-header p {
        font-size: 14px;
    }
}

/* Dashboard styles */
.dashboard-page {
    min-height: 100vh;
    background: #f8fafc;
    padding: 0;
    margin: 0;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    color: #1e293b;
    font-weight: 600;
    margin: 0;
    word-break: break-word;
    max-width: 100%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #64748b;
    font-size: 0.95rem;
}

.logout-button {
    padding: 0.6rem 1.2rem;
    background: #ef4444;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.logout-button:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
}

.post-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.post-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.post-header h2 {
    font-size: 1.25rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.post-date {
    font-size: 0.875rem;
    color: #64748b;
    display: block;
}

.post-content {
    margin-bottom: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.current-number {
    margin-bottom: 1.25rem;
    padding: 0.75rem;
    background: #f1f5f9;
    border-radius: 0.5rem;
}

.current-number label {
    font-size: 0.875rem;
    color: #64748b;
    display: block;
    margin-bottom: 0.25rem;
}

.current-number span {
    font-size: 1.125rem;
    color: #1e293b;
    font-weight: 500;
}

.number-update-form {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.phone-input, .phone-input-arama, .phone-input-telegram {
    flex: 1;
    min-width: 180px;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    color: #1e293b;
}

.phone-input:focus, .phone-input-arama:focus, .phone-input-telegram:focus  {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.update-button {
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    width: 100%;
}

.update-button:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
}

.update-button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

.update-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    display: none;
}

.update-status.success {
    display: block;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.update-status.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 1rem;
    color: #64748b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 2px dashed #e2e8f0;
}

.no-posts p {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

/* Bulk update section */
.bulk-update-section {
    grid-column: 1 / -1;
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.bulk-update-section h3 {
    font-size: 1.25rem;
    color: #1e293b;
    margin-bottom: 1rem;
}

.bulk-update-form {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.bulk-input-group {
    flex: 1;
}

.bulk-input-group label {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.bulk-phone-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    color: #1e293b;
}

.bulk-phone-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.bulk-update-button {
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1.75rem;
}

.bulk-update-button:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
}

.bulk-update-button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

.bulk-update-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    display: none;
}

.phone-info {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .bulk-update-form {
        flex-direction: column;
    }

    .bulk-update-button {
        width: 100%;
        margin-top: 1rem;
    }

    .posts-container {
        grid-template-columns: 1fr;
    }

    .number-update-form {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .phone-input {
        min-width: 100%;
    }

    .update-button {
        width: 100%;
    }
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Error page styles */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 20px;
}

.error-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.error-box h2 {
    color: #e74c3c;
    margin-bottom: 20px;
    font-size: 24px;
}

.error-box .error-message {
    color: #7f8c8d;
    margin-bottom: 30px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.retry-button, .login-button {
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.retry-button {
    background: #3498db;
    color: white;
}

.retry-button:hover {
    background: #2980b9;
}

.login-button {
    background: #95a5a6;
    color: white;
}

.login-button:hover {
    background: #7f8c8d;
} 