/* Main CSS - Premium B2B SaaS Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --bg-color: #072B2E;
    --surface-color: #0A3A3E;
    --text-primary: #FFFFFF;
    --text-secondary: #A0B8BA;
    --accent-primary: #5AB774;
    --accent-hover: #489E5F;
    --accent-yellow: #FEF3A4;
    --pill-bg: #12545A;
    --success-color: #5AB774;
    --border-color: #1A6B72;
    --locked-color: #1A6B72;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-glow: 0 0 15px rgba(90, 183, 116, 0.5);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }

p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Clean Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    outline: none;
    white-space: nowrap;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-primary:disabled {
    background-color: var(--locked-color);
    border-color: var(--locked-color);
    cursor: not-allowed;
}

.btn-secondary {
    background-color: var(--surface-color);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--bg-color);
    border-color: var(--locked-color);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--surface-color);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: 'Inter', sans-serif;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--surface-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-content p {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--bg-color);
    border-top: 2px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error and Success Messages */
.error-message,
.success-message,
.info-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 16px;
}

.error-message {
    background-color: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.success-message {
    background-color: #F0FDF4;
    color: #16A34A;
    border: 1px solid #BBF7D0;
}

.info-message {
    background-color: #EFF6FF;
    color: var(--accent-primary);
    border: 1px solid #BFDBFE;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 300px;
    max-width: 100%;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}

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

.toast.hide {
    opacity: 0;
    transform: translateX(400px);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.toast-icon {
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    flex-shrink: 0;
}

.toast-message {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-primary);
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.toast-close:hover {
    color: var(--text-primary);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 16, 14, 0.72);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: var(--surface-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 400px;
    z-index: 10001;
    animation: modalFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    margin: 0;
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }
    
    h1 { font-size: 20px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }

    .toast-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}