/* CareerPipe CSS - Career Pipeline Management */
:root {
    --primary-color: #06B6D4;
    --primary-dark: #0E7490;
    --primary-light: #CFFAFE;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --gray-900: #111827;
    --gray-800: #1F2937;
    --gray-700: #374151;
    --gray-600: #4B5563;
    --gray-500: #6B7280;
    --gray-400: #9CA3AF;
    --gray-300: #D1D5DB;
    --gray-200: #E5E7EB;
    --gray-100: #F3F4F6;
    --white: #FFFFFF;
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--white);
}

/* LOGIN PAGE */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-box {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

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

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
}

.login-header h1 {
    font-size: 28px;
    color: var(--primary-dark);
    margin-bottom: 8px;
    font-weight: 600;
}

.login-header p {
    color: var(--gray-600);
    font-size: 14px;
}

.login-form {
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

.error-message {
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 12px;
}

.login-footer {
    text-align: center;
    color: var(--gray-500);
    font-size: 13px;
}

/* APP LAYOUT */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.app-nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 20px;
    min-width: 180px;
}

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

.nav-tabs {
    display: flex;
    gap: 4px;
    flex: 1;
    margin-left: 40px;
}

.nav-tab {
    background: none;
    border: none;
    padding: 12px 16px;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    position: relative;
    top: 2px;
}

.nav-tab:hover {
    color: var(--primary-color);
}

.nav-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 180px;
    justify-content: flex-end;
}

.nav-user span {
    font-size: 14px;
    color: var(--gray-700);
}

.btn-logout {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.app-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.2s ease-in;
}

.tab-content.active {
    display: block;
}

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

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

.tab-header h2 {
    font-size: 24px;
    color: var(--gray-900);
    font-weight: 700;
}

/* CONTROLS */
.contacts-controls,
.opportunities-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-box {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
}

.filter-select {
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    background: var(--white);
    cursor: pointer;
}

/* GRID LAYOUTS */
.contacts-grid,
.opportunities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
    transform: translateY(-2px);
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.card-menu {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
}

.card-subtitle {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
}

.meta-tag {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 4px 8px;
    border-radius: 4px;
}

.card-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-prospect {
    background: rgba(59, 130, 246, 0.1);
    color: #2563EB;
}

.status-in_progress {
    background: rgba(245, 158, 11, 0.1);
    color: #D97706;
}

.status-offer {
    background: rgba(34, 197, 94, 0.1);
    color: #16A34A;
}

.status-closed {
    background: rgba(107, 114, 128, 0.1);
    color: #4B5563;
}

.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
}

/* PIPELINE BOARD */
.pipeline-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
}

.pipeline-column {
    background: var(--gray-100);
    border-radius: 8px;
    padding: 12px;
    min-width: 280px;
}

.pipeline-column h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.pipeline-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pipeline-item {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    padding: 12px;
    cursor: grab;
    transition: all 0.2s;
}

.pipeline-item:active {
    cursor: grabbing;
}

.pipeline-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.1);
}

/* DASHBOARD */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.stat-card h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-card p {
    font-size: 13px;
    opacity: 0.9;
}

.dashboard-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.dashboard-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--gray-900);
}

.actions-list,
.interactions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-item,
.interaction-item {
    padding: 12px;
    background: var(--gray-50);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
}

.action-item-title,
.interaction-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.action-item-meta,
.interaction-item-meta {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 4px;
}

/* MODALS */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.2s ease-in;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-lg {
    max-width: 700px;
}

.modal-xlg {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--gray-700);
}

.form {
    padding: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--gray-600);
}

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

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 10px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.modal-close-btn {
    min-width: 100px;
}

/* CONTACTS CHECKLIST */
.contacts-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background: var(--gray-50);
    border-radius: 6px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--white);
    border-radius: 4px;
    border: 1px solid var(--gray-200);
}

.checklist-item input[type="checkbox"] {
    cursor: pointer;
}

.checklist-item label {
    cursor: pointer;
    flex: 1;
}

/* FILE UPLOAD */
.file-upload {
    display: flex;
    gap: 8px;
    align-items: center;
}

.file-upload input[type="file"] {
    display: none;
}

#opp-upload-btn {
    cursor: pointer;
}

.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: 4px;
    border: 1px solid var(--gray-200);
    font-size: 13px;
}

.attachment-delete {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-weight: 600;
}

/* DETAIL VIEW */
.detail-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
    padding: 20px;
    max-height: 85vh;
    overflow-y: auto;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-section {
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
}

.detail-section h3 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--gray-700);
}

.detail-value {
    color: var(--gray-900);
    text-align: right;
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
}

.interactions-panel {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 16px;
}

.interactions-panel h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.timeline-item {
    padding: 12px;
    background: var(--white);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    font-size: 13px;
}

.timeline-item-type {
    font-weight: 600;
    color: var(--primary-dark);
    text-transform: uppercase;
    font-size: 11px;
}

.timeline-item-content {
    margin-top: 4px;
    color: var(--gray-700);
    line-height: 1.4;
}

.timeline-item-date {
    margin-top: 6px;
    font-size: 11px;
    color: var(--gray-500);
}

/* USERS LIST */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-item {
    padding: 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--gray-900);
}

.user-email {
    font-size: 13px;
    color: var(--gray-600);
}

.user-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sm-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-sm-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.btn-sm-secondary:hover {
    background: var(--gray-300);
}

.btn-sm-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ACCOUNT SECTIONS */
.account-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.account-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 20px;
}

.account-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

#password-form {
    max-width: 400px;
}

.message {
    padding: 12px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 14px;
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .pipeline-board {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-tabs {
        margin-left: 20px;
        gap: 0;
        font-size: 13px;
    }

    .nav-tab {
        padding: 12px 10px;
    }

    .detail-content {
        grid-template-columns: 1fr;
    }

    .contacts-grid,
    .opportunities-grid {
        grid-template-columns: 1fr;
    }

    .pipeline-board {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }

    .modal-content {
        max-width: 95%;
    }

    .contacts-controls,
    .opportunities-controls {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 24px;
    }

    .nav-brand {
        min-width: auto;
    }

    .nav-brand span {
        display: none;
    }

    .nav-tabs {
        margin-left: 10px;
    }

    .nav-tab {
        padding: 12px 8px;
        font-size: 12px;
    }

    .nav-user {
        min-width: auto;
    }

    .nav-user span {
        display: none;
    }

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tab-header h2 {
        margin-bottom: 12px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .pipeline-board {
        grid-template-columns: 1fr;
    }
}
