/* --- Importação da fonte --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- Estilos Globais e Reset --- */
body {
    margin: 0;
    background: #f4f6f8;
    height: 100vh;
    display: flex;
}
body, html {
    font-family: 'Poppins', sans-serif;
}

/* --- Login Page Styles --- */
.container {
    display: flex;
    width: 100%;
    height: 100vh;
    
}

.left {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: #fff;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: black;
    margin-bottom: 30px;
}

.form-box {
    width: 100%;
    max-width: 360px;
}

.form-box h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.form-box p {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

input {
    width: calc(100% - 20px);
    padding: 12px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 15px;
    outline: none;
    transition: 0.2s;
}

input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 4px rgba(13, 110, 253, 0.3);
}

button {
    width: 100%;
    padding: 12px;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #0b5ed7;
}

.right {
    width: 100%;
    background: url('https://atualoja.com/wp-content/uploads/2024/06/a-tua-loja.jpg') no-repeat center center/cover;
}

@media(max-width: 900px) {
    .right {
        display: none;
    }
    .left {
        width: 100%;
    }
}

/* --- Main Content Layout --- */
.main-content-layout {
    display: flex;
    flex: 1;
}

/* --- Sidebar (Novo Design) --- */
.sidebar {
    width: 250px;
    background: #fff; /* Fundo branco para a sidebar */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05); /* Sombra para destacá-la */
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    transition: width 0.3s ease;
}

.sidebar h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #4a90e2; /* Cor azul moderna para o título */
    margin-bottom: 30px;
}

.sidebar nav {
    flex-grow: 1;
}

.sidebar nav a {
    display: block;
    text-decoration: none;
    color: #555; /* Cor de texto mais suave */
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar nav a:hover {
    background-color: #e6f0ff; /* Fundo azul claro ao passar o rato */
    color: #4a90e2; /* Texto azul ao passar o rato */
}

.sidebar .submenu {
    border-left: 3px solid #ddd;
    margin-left: 20px;
    padding-left: 10px;
    margin-top: -5px;
    margin-bottom: 5px;
}

.sidebar .submenu a {
    padding-left: 20px;
    font-size: 14px;
    color: #777;
}

.sidebar .submenu a:hover {
    background-color: #f6f8fa;
    color: #4a90e2;
}

.logout {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #eee;
}

.logout a {
    background: #d9534f; /* Vermelho para a acção de terminar sessão */
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    display: block;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    transition: background-color 0.2s ease;
    margin-bottom: 0; /* Remove a margem extra do código antigo */
}

.logout a:hover {
    background: #c9302c;
    color: #ffffff !important; /* Mantém a cor do texto branca */
}

/* --- Main Content Section --- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
    background-color: #f4f6f8;
}

header {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.iframe-wrapper {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* --- Responsive Panel --- */
@media(max-width: 768px) {
    .sidebar {
        width: 80px;
        padding: 15px;
    }
    .sidebar h2 {
        display: none;
    }
    .sidebar nav a {
        padding: 12px 8px;
        font-size: 12px;
        text-align: center;
    }
    .sidebar nav .submenu {
        padding-left: 5px;
        margin-left: 10px;
    }
    .main-content {
        padding: 10px;
    }
    header {
        padding: 15px;
    }
    .iframe-wrapper {
        border-radius: 8px;
    }
    .logout a {
        padding: 10px;
        font-size: 14px;
    }
}




table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
thead {
       background-color: #e7e7e7;
    color: #000000;
}
th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
.pagination {
    margin-top: 20px;
    text-align: center;
}
.pagination a {
    display: inline-block;
    margin: 0 4px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
}
.pagination a.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}
.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}
.modal-header {
    font-weight: bold;
    margin-bottom: 15px;
}
.modal-body p {
    margin: 6px 0;
}
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2.8em;
    cursor: pointer;
    color: #888;
}
.close-btn:hover {
    color: #333;
}
.container2 {
    width: 100%;
}

.alert {
    padding: 12px 20px;
    margin: 15px 0;
    border-radius: 8px;
    font-weight: 500;
}
.alert.success {
    background-color: #d4edda;
    color: #155724;
}
.alert.error {
    background-color: #f8d7da;
    color: #721c24;
}

.button.delete {
    background-color: #e74c3c; /* Vermelho */
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.button.delete:hover {
    background-color: #c0392b;
}


.button.edit {
    background-color: #408050; /* Vermelho */
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
    padding:8px 30px;
}

.button.edit:hover {
    background-color: #245630;
}

.container2 tr th:nth-child(4),
.container2 tr td:nth-child(4),
.container2 tr th:nth-child(5),
.container2 tr td:nth-child(5),
.container2 tr th:nth-child(6),
.container2 tr td:nth-child(6){
    text-align:center;
}

div#form-utilizador {
    width: 100%;
    display: flex;
    flex-direction: column;
}
/* Estilo geral de inputs e textarea */
textarea {
    font-family: 'Outfit', sans-serif; /* Mantém a mesma fonte da plataforma */
    font-size: 14px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 7px;
    width: 100%; /* Faz textarea ocupar toda a largura da coluna */
    box-sizing: border-box; /* Inclui padding na largura total */
    color: #333;
    background-color: #fff;
    transition: border-color 0.2s ease;
}

textarea {
    resize: vertical; /* Permite redimensionar apenas verticalmente */
    min-height: 60px; /* Altura mínima padrão */
}


/* Estilo base para todos os selects */
select {
    appearance: none; /* remove a seta padrão */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}


/* Select específico do #marca */
select {
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
    padding-right: 32px; /* espaço para a seta custom */
}

/* Quando desativado */
select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    color: #aaa;
}

select {
    width: 250px!important;
    max-width:100%!important;
}

input#button {
    background: #0d6efd;
    color: white;
    font-weight: 600;
    font-size: 20px;
}
input#button:hover {
    opacity:0.8;
    cursor:pointer!important;
}
div#main2 {
    
    width: 98%!important;
    min-width: 98%!important;
}