/* 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;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #4a154b 0%, #611f69 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    height: 32px;
    width: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-user {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Hamburger Menu Styles */
.hamburger-menu {
    position: relative;
    z-index: 1001;
}

.hamburger-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.hamburger-button:hover {
    background-color: rgba(255,255,255,0.1);
}

.sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.open {
    right: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    background: linear-gradient(135deg, #4a154b 0%, #611f69 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.sidebar-close:hover {
    background-color: rgba(255,255,255,0.1);
}

.sidebar-content {
    padding: 0;
}

.sidebar-section {
    border-bottom: 1px solid #e9ecef;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    padding: 1rem 1.5rem 0.5rem 1.5rem;
    margin: 0;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav-item {
    margin: 0;
}

.sidebar-nav-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav-link:hover {
    background-color: #f8f9fa;
    border-left-color: #4a154b;
    color: #4a154b;
}

.sidebar-nav-link i {
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar-user-info {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-user-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.sidebar-user-status {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Main content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Flash messages */
.flash-messages {
    margin-bottom: 2rem;
}

.flash-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    margin-bottom: 1rem;
}

/* Cards and containers */
.card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.auth-container {
    max-width: 400px;
    margin: 4rem auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0.25rem;
}

.btn-primary {
    background-color: #4285f4;
    color: white;
}

.btn-primary:hover {
    background-color: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.3);
}

.btn-slack {
    background-color: #4a154b;
    color: white;
}

.btn-slack:hover {
    background-color: #611f69;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* Status indicators */
.status-connected {
    color: #28a745;
    font-weight: 500;
}

.status-disconnected {
    color: #dc3545;
    font-weight: 500;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.connected {
    background-color: #28a745;
}

.status-indicator.disconnected {
    background-color: #dc3545;
}

/* Webhook items */
.webhook-list {
    display: grid;
    gap: 1.5rem;
}

.webhook-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.webhook-item:hover {
    border-color: #4285f4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.webhook-channel {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a154b;
    margin-bottom: 1rem;
}

.webhook-url-container {
    margin: 1rem 0;
}

.webhook-url {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    color: #495057;
    position: relative;
}

.webhook-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Step-by-step guide */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-number {
    background-color: #4285f4;
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #343a40;
}

.step-content p {
    margin: 0;
    color: #6c757d;
    line-height: 1.5;
}

.step-content code {
    display: block;
    margin-top: 0.5rem;
    word-break: break-all;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.me-2 {
    margin-right: 0.5rem;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background-color: #343a40;
    color: white;
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .nav-title a {
        font-size: 1.2rem;
        gap: 0.3rem;
    }

    .nav-logo {
        height: 24px;
    }

    .nav-links {
        gap: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

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

    .auth-container {
        margin: 2rem auto;
    }

    .webhook-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .nav-title a {
        font-size: 1rem;
        gap: 0.25rem;
    }

    .nav-logo {
        height: 20px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

.card {
    animation: fadeIn 0.3s ease-out;
}

/* Focus styles for accessibility */
.btn:focus,
.form-input:focus,
.form-select:focus,
.nav-link:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}