/**
 * Marketing Planner - Main Stylesheet
 */

/* General Styles */
body {
    background-color: #f8f9fa;
    color: #333;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    padding-bottom: 20px;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

.content {
    width: 100%;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.page-header p {
    margin-bottom: 0;
}

/* Navbar */
.navbar {
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar-brand img {
    height: 30px;
    margin-right: 10px;
}

.navbar .dropdown-menu {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
}

.navbar .dropdown-item {
    padding: 0.5rem 1rem;
}

.navbar .dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    opacity: 0.7;
}

.navbar .dropdown-item:hover i {
    opacity: 1;
}

.navbar .dropdown-divider {
    margin: 0.25rem 0;
}

.navbar .nav-item {
    margin-right: 5px;
}

.navbar .nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

.navbar .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.navbar .nav-link.active {
    background-color: rgba(0, 0, 0, 0.1);
}

.navbar .nav-link i {
    margin-right: 5px;
}

/* Sidebar */
.sidebar {
    min-width: 250px;
    max-width: 250px;
    background: #343a40;
    color: #fff;
    transition: all 0.3s;
}

.sidebar.active {
    margin-left: -250px;
}

.sidebar .sidebar-header {
    padding: 20px;
    background: #2c3136;
}

.sidebar ul.components {
    padding: 20px 0;
    border-bottom: 1px solid #4b545c;
}

.sidebar ul p {
    color: #fff;
    padding: 10px;
}

.sidebar ul li a {
    padding: 10px 15px;
    font-size: 1.1em;
    display: block;
    color: #fff;
    text-decoration: none;
}

.sidebar ul li a:hover {
    color: #fff;
    background: #4b545c;
}

.sidebar ul li.active > a,
.sidebar a[aria-expanded="true"] {
    color: #fff;
    background: #4b545c;
}

.sidebar a[data-bs-toggle="collapse"] {
    position: relative;
}

.sidebar .dropdown-toggle::after {
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.sidebar ul ul a {
    font-size: 0.9em !important;
    padding-left: 30px !important;
    background: #2c3136;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.card-header:first-child {
    border-radius: calc(0.5rem - 1px) calc(0.5rem - 1px) 0 0;
}

.card-footer {
    background-color: #fff;
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
}

.card-footer:last-child {
    border-radius: 0 0 calc(0.5rem - 1px) calc(0.5rem - 1px);
}

/* Dashboard Stats */
.dashboard-stat-card {
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s;
}

.dashboard-stat-card:hover {
    transform: translateY(-5px);
}

.dashboard-stat-card .card-body {
    padding: 1.5rem;
}

.dashboard-stat-card h2 {
    font-size: 2.5rem;
    font-weight: 600;
}

.dashboard-stat-card .opacity-50 {
    opacity: 0.5;
}

/* Forms */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
}

.form-select {
    border-radius: 0.375rem;
    padding: 0.5rem 2.25rem 0.5rem 0.75rem;
    border: 1px solid #ced4da;
}

.form-check-input {
    width: 1.25em;
    height: 1.25em;
    margin-top: 0.125em;
}

.form-check-label {
    margin-bottom: 0;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    border-radius: 0.5rem;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 500;
    border-top: none;
    background-color: #f8f9fa;
}

.table th[data-sort] {
    cursor: pointer;
}

.table th[data-sort]:hover {
    background-color: #e9ecef;
}

.table th[data-sort]::after {
    content: "\f0dc";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-left: 5px;
    opacity: 0.3;
}

.table th[data-sort][data-direction="asc"]::after {
    content: "\f0de";
    opacity: 1;
}

.table th[data-sort][data-direction="desc"]::after {
    content: "\f0dd";
    opacity: 1;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Alerts */
.alert {
    border-radius: 0.375rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: none;
}

.alert-dismissible .btn-close {
    padding: 1.25rem;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
}

/* Timeline Specific Styles */
.timeline-container {
    position: relative;
    height: 600px;
    overflow: hidden;
}

#timeline {
    width: 100%;
    height: 100%;
}

.timeline-legend .badge {
    display: inline-block;
    width: 20px;
    height: 10px;
    margin-right: 5px;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.login-form {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.login-form .logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-form .logo img {
    height: 60px;
}

.login-form h1 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    .content {
        padding: 15px;
    }
    
    .page-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .dashboard-stat-card .card-body {
        padding: 1rem;
    }
    
    .dashboard-stat-card h2 {
        font-size: 2rem;
    }
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .content {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
