/* 
 * IZTV Dashboard Main Stylesheet
 */

/* General Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

/* Wrapper */
.wrapper {
    display: flex;
    width: 100%;
}

/* Sidebar */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    min-height: 100vh;
    transition: all 0.3s;
}

#sidebar.active {
    margin-left: -250px;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: #2c3e50;
}

#sidebar ul li a {
    padding: 15px;
    display: block;
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

#sidebar ul li a:hover,
#sidebar ul li.active > a {
    background: #3498db;
}

#sidebar ul li i {
    margin-right: 10px;
}

/* Submenu Styles */
#sidebar ul ul {
    padding-left: 15px;
    background: rgba(0, 0, 0, 0.2);
}

#sidebar ul ul li a {
    padding: 10px 15px 10px 30px;
    font-size: 0.9em;
    display: block;
    transition: all 0.3s;
}

#sidebar .dropdown-toggle::after {
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

#sidebar a[aria-expanded="true"] {
    background: #2980b9;
}

/* Content */
#content {
    width: 100%;
    padding: 0;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Navbar */
.navbar {
    padding: 15px 10px;
    border-bottom: 1px solid #ddd;
}

#sidebarCollapse {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 5px;
}

/* Cards */
.card {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border-radius: 8px;
    border: none;
}

.card-header {
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
}

.stats-card {
    text-align: center;
    padding: 20px;
}

.stats-card i {
    font-size: 24px;
    margin-bottom: 10px;
}

.stats-card .number {
    font-size: 24px;
    font-weight: 600;
}

.stats-card .label {
    font-size: 14px;
    color: #777;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table.dataTable thead th {
    position: relative;
    background-image: none !important;
}

table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after {
    position: absolute;
    top: 12px;
    right: 8px;
    display: block;
    font-family: "Font Awesome 5 Free";
}

table.dataTable thead th.sorting:after {
    content: "\f0dc";
    color: #ddd;
    font-size: 0.8em;
}

table.dataTable thead th.sorting_asc:after {
    content: "\f0de";
}

table.dataTable thead th.sorting_desc:after {
    content: "\f0dd";
}

/* Forms */
.form-label {
    font-weight: 500;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

/* Login page */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.login-form {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.login-logo img {
    max-width: 150px;
}

/* Media Queries */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }
    
    #sidebar.active {
        margin-left: 0;
        position: fixed;
        z-index: 1000;
    }
    
    #content {
        width: 100%;
    }
}

/* Programação */
.program-item {
    border-left: 4px solid var(--primary-color);
    padding: 10px;
    margin-bottom: 10px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.program-item .media-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: white;
    background-color: var(--info-color);
}

.program-item .duration {
    font-size: 12px;
    color: #777;
}

/* Dashboard */
.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Progress Bar */
.progress {
    height: 10px;
    margin-bottom: 10px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

/* Fornada Schedule */
.fornada-schedule {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.fornada-day {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    background-color: white;
}

.fornada-day h6 {
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.fornada-item {
    padding: 5px;
    background-color: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 5px;
}

/* File Upload */
.file-upload {
    position: relative;
    overflow: hidden;
    margin: 10px 0;
}

.file-upload input[type=file] {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
    font-size: 100px;
    text-align: right;
    filter: alpha(opacity=0);
    opacity: 0;
    outline: none;
    background: white;
    cursor: inherit;
    display: block;
}

.preview-image {
    max-width: 150px;
    max-height: 150px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Drag and Drop */
.dropzone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    background-color: #f8f9fa;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.dropzone:hover {
    border-color: var(--primary-color);
}

.dropzone i {
    font-size: 30px;
    color: #aaa;
    margin-bottom: 10px;
}

/* Activity Timeline */
.timeline {
    position: relative;
    margin: 0 0 30px;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ddd;
    left: 35px;
    margin-left: -1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 15px;
}

.timeline-badge {
    position: absolute;
    top: 0;
    left: 35px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-align: center;
    color: white;
    line-height: 36px;
    margin-left: -18px;
    background-color: var(--primary-color);
}

.timeline-panel {
    position: relative;
    margin-left: 60px;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.timeline-date {
    display: block;
    color: #777;
    font-size: 12px;
    margin-bottom: 5px;
}

/* Calendario de Refeições */
.refeicao-calendar {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

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

.refeicao-day {
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.refeicao-day.today {
    border-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.1);
}

.refeicao-day h5 {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.refeicao-item {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
}

.refeicao-item h6 {
    margin-bottom: 5px;
    color: var(--primary-color);
}

/* Menu de acesso rápido */
.quick-menu .btn {
    width: 120px;
    height: 100px;
    text-align: center;
    transition: all 0.3s;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.quick-menu .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.quick-menu .btn i {
    font-size: 28px;
    margin-bottom: 8px;
}

/* Tasks panel */
.task-item {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    background-color: white;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.task-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.task-item .task-date {
    font-size: 12px;
    color: #777;
}

.task-item .task-priority {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: white;
}

.task-item .priority-high {
    background-color: var(--danger-color);
}

.task-item .priority-medium {
    background-color: var(--warning-color);
}

.task-item .priority-low {
    background-color: var(--success-color);
}