/* Variables Melis Platform */
:root {
    --melis-red: #E31E24;
    --melis-red-dark: #C41217;
    --melis-green: #7CB342;
    --melis-blue: #4267B2;
    --melis-grey: #2C2C2C;
    --melis-grey-light: #F5F5F5;
    --melis-grey-medium: #CCCCCC;
    --melis-text: #333333;
    --sidebar-width: 190px;
}

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

body {
    font-family: 'Roboto', Arial, sans-serif;
    background: #2C2C2C;
    color: var(--melis-text);
}

/* === LOGIN PAGE === */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2C2C2C 100%);
}

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

.logo-container {
    text-align: center;
}

.logo-circle {
    display: inline-block;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    width: 450px;
    max-width: 90%;
}

.login-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--melis-grey);
    margin-bottom: 20px;
    text-align: center;
}

.login-title i {
    margin-right: 8px;
}

.demo-credentials {
    background: #F0F4F8;
    border: 1px solid #D0D7DE;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 30px;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    color: #555;
}

.access-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-access {
    width: 100%;
    padding: 20px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.btn-access:hover {
    border-color: var(--melis-red);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.15);
    transform: translateY(-2px);
}

.btn-access-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.btn-association .btn-access-icon {
    background: linear-gradient(135deg, #4267B2 0%, #2C4A8C 100%);
    color: white;
}

.btn-agent .btn-access-icon {
    background: linear-gradient(135deg, #E31E24 0%, #C41217 100%);
    color: white;
}

.btn-access-content {
    flex: 1;
}

.btn-access-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--melis-grey);
    margin-bottom: 4px;
}

.btn-access-desc {
    font-size: 13px;
    color: #666;
}

.btn-access-arrow {
    font-size: 20px;
    color: #CCC;
    transition: all 0.3s;
}

.btn-access:hover .btn-access-arrow {
    color: var(--melis-red);
    transform: translateX(5px);
}

.login-info {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 15px;
    background: #F9F9F9;
    border-radius: 4px;
    margin-top: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--melis-grey);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #DDD;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--melis-red);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--melis-red);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 15px;
}

.btn-login:hover {
    background: var(--melis-red-dark);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-me input {
    margin-right: 6px;
}

.forgot-password {
    color: var(--melis-red);
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    color: #999;
    font-size: 12px;
}

.login-footer a {
    color: var(--melis-red);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* === MAIN APPLICATION LAYOUT === */
.app-container {
    display: flex;
    height: 100vh;
    background: #F5F5F5;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--melis-grey);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    background: var(--melis-red);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-header i {
    margin-right: 8px;
}

.user-info {
    padding: 15px;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--melis-red);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 18px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

.user-status {
    font-size: 11px;
    color: #7CB342;
    display: flex;
    align-items: center;
}

.user-status i {
    margin-right: 4px;
    font-size: 8px;
}

.sidebar-menu {
    flex: 1;
    padding: 10px 0;
}

.menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: var(--melis-red);
}

.menu-item.active {
    background: var(--melis-red);
    border-left-color: var(--melis-red-dark);
}

.menu-item i {
    width: 20px;
    margin-right: 10px;
}

.menu-label {
    flex: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    background: var(--melis-red);
    color: white;
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.page-title {
    font-size: 18px;
    font-weight: 500;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-icon {
    background: rgba(255,255,255,0.2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
}

.top-bar-icon:hover {
    background: rgba(255,255,255,0.3);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #7CB342;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 20px;
}

.stat-icon.red { background: var(--melis-red); color: white; }
.stat-icon.blue { background: var(--melis-blue); color: white; }
.stat-icon.green { background: var(--melis-green); color: white; }
.stat-icon.grey { background: #757575; color: white; }

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: #777;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--melis-grey);
}

/* Content Card */
.content-card {
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--melis-grey);
    display: flex;
    align-items: center;
}

.card-title i {
    margin-right: 10px;
    color: var(--melis-red);
}

.card-actions {
    display: flex;
    gap: 10px;
}

.card-body {
    padding: 25px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--melis-red);
    color: white;
}

.btn-primary:hover {
    background: var(--melis-red-dark);
}

.btn-success {
    background: var(--melis-green);
    color: white;
}

.btn-success:hover {
    background: #689F38;
}

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

.btn-secondary:hover {
    background: #616161;
}

.btn-outline {
    background: white;
    border: 1px solid #DDD;
    color: var(--melis-grey);
}

.btn-outline:hover {
    background: #F5F5F5;
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #F5F5F5;
}

.data-table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--melis-grey);
    border-bottom: 2px solid #E0E0E0;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #F0F0F0;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: #FAFAFA;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.pending {
    background: #FFE082;
    color: #F57C00;
}

.status-badge.in-review {
    background: #BBDEFB;
    color: #1976D2;
}

.status-badge.approved {
    background: #C8E6C9;
    color: #388E3C;
}

.status-badge.rejected {
    background: #FFCDD2;
    color: #D32F2F;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #DDD;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    border-color: var(--melis-red);
    color: var(--melis-red);
}

.action-btn.edit:hover {
    background: #7CB342;
    border-color: #7CB342;
    color: white;
}

.action-btn.delete:hover {
    background: var(--melis-red);
    border-color: var(--melis-red);
    color: white;
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--melis-grey);
    margin-bottom: 8px;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 10px 12px;
    border: 1px solid #DDD;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Roboto', Arial, sans-serif;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--melis-red);
}

.form-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}
