/* Base styles for StartupCRM */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&family=Roboto:wght@400;500;700&display=swap');

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

:root {
    --bg-color: #ffffff;
    --bg-light: #f5f5f5;
    --accent-orange: #FF6600;
    --accent-green: #31B004;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #dddddd;
    --border-dark: #999999;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --radius: 4px;
    --top-bar-height: 50px;
    --sidebar-width: 70px;
    --sidebar-width-mobile: 60px;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
}

a {
    color: var(--accent-orange);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button {
    font-family: 'Open Sans', sans-serif;
    cursor: pointer;
    border: none;
    border-radius: var(--radius);
    padding: 8px 16px;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: white;
}

.btn-primary:hover {
    background-color: #e55a00;
    text-decoration: none;
}

input, select, textarea {
    font-family: 'Open Sans', sans-serif;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 14px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-orange);
}

.messages {
    margin-bottom: 20px;
}

.message {
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.message.error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.message.success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.message.info {
    background-color: #eef;
    color: #33c;
    border: 1px solid #ccf;
}

/* Layout Structure */
.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    height: var(--top-bar-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    max-width: 100%;
}

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

.app-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--accent-orange);
    margin: 0;
}

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

.top-bar-link {
    color: var(--text-dark);
    font-size: 14px;
    padding: 5px 10px;
    border-radius: var(--radius);
    transition: background-color 0.2s;
}

.top-bar-link:hover {
    background-color: var(--bg-light);
    text-decoration: none;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--top-bar-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--top-bar-height));
    background-color: var(--bg-light);
    border-right: 1px solid var(--border-color);
    z-index: 999;
    overflow-y: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.sidebar-link {
    padding: 15px 10px;
    color: var(--text-dark);
    font-size: 20px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
    position: relative;
}

.sidebar-link i {
    font-size: 22px;
}

.sidebar-label {
    font-size: 11px;
    display: none;
}

.sidebar-link:hover {
    background-color: rgba(255, 102, 0, 0.1);
    text-decoration: none;
    border-left-color: var(--accent-orange);
}

.sidebar-link:hover .sidebar-label {
    display: block;
}

.sidebar-link.active {
    background-color: rgba(255, 102, 0, 0.15);
    border-left-color: var(--accent-orange);
    color: var(--accent-orange);
}

.sidebar-link.active .sidebar-label {
    display: block;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--top-bar-height);
    padding-left: 20px;
    min-height: calc(100vh - var(--top-bar-height));
    width: calc(100% - var(--sidebar-width));
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-width-mobile);
    }
    
    .sidebar-link {
        padding: 12px 8px;
        text-align: center;
        font-size: 18px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .sidebar-link i {
        font-size: 20px;
    }
    
    .sidebar-link:hover,
    .sidebar-link.active {
        border-left: none;
        border-bottom-color: var(--accent-orange);
    }
    
    .sidebar-link:hover .sidebar-label,
    .sidebar-link.active .sidebar-label {
        display: block;
    }
    
    .main-content {
        margin-left: var(--sidebar-width-mobile);
        width: calc(100% - var(--sidebar-width-mobile));
        padding: 15px;
    }
    
    .top-bar-content {
        padding: 0 10px;
    }
    
    .app-title {
        font-size: 16px;
    }
    
    .top-bar-right {
        gap: 8px;
    }
    
    .top-bar-link {
        font-size: 12px;
        padding: 5px 8px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        border-right: none;
        border-top: 1px solid var(--border-color);
    }
    
    .sidebar-nav {
        flex-direction: row;
        justify-content: space-around;
        padding: 10px 0;
    }
    
    .sidebar-link {
        padding: 8px 5px;
        font-size: 18px;
        border-bottom: none;
        border-top: 3px solid transparent;
        flex: 1;
        text-align: center;
    }
    
    .sidebar-link i {
        font-size: 20px;
    }
    
    .sidebar-link:hover,
    .sidebar-link.active {
        border-bottom: none;
        border-top-color: var(--accent-orange);
    }
    
    .sidebar-link:hover .sidebar-label,
    .sidebar-link.active .sidebar-label {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        margin-bottom: 60px;
        width: 100%;
    }
}
